Manages Whisper model lifecycle in Unity scene.
More...
Manages Whisper model lifecycle in Unity scene.
◆ CreateStream() [1/2]
| async Task< WhisperStream > Whisper.WhisperManager.CreateStream |
( |
int | frequency, |
|
|
int | channels ) |
|
inline |
Create a new instance of Whisper streaming transcription.
- Parameters
-
| frequency | Audio sample rate. |
| channels | Audio channels count. |
- Returns
- New streaming transcription. Null if failed.
◆ CreateStream() [2/2]
Create a new instance of Whisper streaming transcription from microphone input.
- Returns
- New streaming transcription. Null if failed.
◆ GetTextAsync() [1/2]
| async Task< WhisperResult > Whisper.WhisperManager.GetTextAsync |
( |
AudioClip | clip | ) |
|
|
inline |
Start async transcription of audio clip.
- Returns
- Full audio transcript. Null if transcription failed.
◆ GetTextAsync() [2/2]
| async Task< WhisperResult > Whisper.WhisperManager.GetTextAsync |
( |
float[] | samples, |
|
|
int | frequency, |
|
|
int | channels ) |
|
inline |
Start async transcription of audio buffer.
- Parameters
-
| samples | Raw audio buffer. |
| frequency | Audio sample rate. |
| channels | Audio channels count. |
- Returns
- Full audio transcript. Null if transcription failed.
◆ InitModel()
| async Task Whisper.WhisperManager.InitModel |
( |
| ) |
|
|
inline |
Load model and default parameters. Prepare it for text transcription.
◆ IsMultilingual()
| bool Whisper.WhisperManager.IsMultilingual |
( |
| ) |
|
|
inline |
Checks if currently loaded whisper model supports multilingual transcription.
◆ audioCtx
| int Whisper.WhisperManager.audioCtx |
◆ dropOldBuffer
| bool Whisper.WhisperManager.dropOldBuffer |
◆ enableTokens
| bool Whisper.WhisperManager.enableTokens |
◆ initialPrompt
| string Whisper.WhisperManager.initialPrompt |
◆ keepSec
| float Whisper.WhisperManager.keepSec = 0.2f |
◆ language
| string Whisper.WhisperManager.language = "en" |
◆ lengthSec
| float Whisper.WhisperManager.lengthSec = 10f |
◆ logLevel
| LogLevel Whisper.WhisperManager.logLevel = LogLevel.Log |
◆ noContext
| bool Whisper.WhisperManager.noContext = true |
◆ singleSegment
| bool Whisper.WhisperManager.singleSegment |
◆ speedUp
| bool Whisper.WhisperManager.speedUp |
◆ stepSec
| float Whisper.WhisperManager.stepSec = 3f |
◆ tokensTimestamps
| bool Whisper.WhisperManager.tokensTimestamps |
◆ translateToEnglish
| bool Whisper.WhisperManager.translateToEnglish |
◆ updatePrompt
| bool Whisper.WhisperManager.updatePrompt = true |
◆ useVad
| bool Whisper.WhisperManager.useVad = true |
◆ IsLoaded
| bool Whisper.WhisperManager.IsLoaded |
|
get |
Checks if whisper weights are loaded and ready to be used.
◆ IsLoading
| bool Whisper.WhisperManager.IsLoading |
|
get |
Checks if whisper weights are still loading and not ready.
◆ IsModelPathInStreamingAssets
| bool Whisper.WhisperManager.IsModelPathInStreamingAssets |
|
getset |
◆ ModelPath
| string Whisper.WhisperManager.ModelPath |
|
getset |
◆ OnNewSegment
Raised when whisper transcribed a new text segment from audio.
◆ OnProgress
Raised when whisper made some progress in transcribing audio. Progress changes from 0 to 100 included.
The documentation for this class was generated from the following file: