![]() |
FirstModulAR 0.1.0
|
Wrapper for loaded whisper model. More...
Public Member Functions | |
| WhisperResult | GetText (AudioClip clip, WhisperParams param) |
| Transcribes audio clip. Will block thread until transcription complete. | |
| async Task< WhisperResult > | GetTextAsync (AudioClip clip, WhisperParams param) |
| Start async transcription of audio clip. | |
| WhisperResult | GetText (float[] samples, int frequency, int channels, WhisperParams param) |
| Transcribe audio buffer. Will block thread until transcription complete. | |
| async Task< WhisperResult > | GetTextAsync (float[] samples, int frequency, int channels, WhisperParams param) |
| Start async transcription of audio buffer. | |
Static Public Member Functions | |
| static WhisperWrapper | InitFromFile (string modelPath) |
| Loads whisper model from file path. | |
| static async Task< WhisperWrapper > | InitFromFileAsync (string modelPath) |
| Start async loading of whisper model from file path. | |
| static WhisperWrapper | InitFromBuffer (byte[] buffer) |
| Loads whisper model from byte buffer. | |
| static async Task< WhisperWrapper > | InitFromBufferAsync (byte[] buffer) |
| Start async loading of whisper model from byte buffer. | |
Static Public Attributes | |
| const int | WhisperSampleRate = 16000 |
Properties | |
| bool | IsMultilingual [get] |
| Checks if currently loaded whisper model supports multilingual transcription. | |
Events | |
| OnNewSegmentDelegate | OnNewSegment |
| Raised when whisper transcribed a new text segment from audio. | |
| OnProgressDelegate | OnProgress |
| Raised when whisper made some progress in transcribing audio. Progress changes from 0 to 100 included. | |
Wrapper for loaded whisper model.
|
inline |
Transcribes audio clip. Will block thread until transcription complete.
|
inline |
Transcribe audio buffer. Will block thread until transcription complete.
| samples | Raw audio buffer. |
| frequency | Audio sample rate. |
| channels | Audio channels count. |
| param | Whisper inference parameters. |
|
inline |
Start async transcription of audio clip.
|
inline |
Start async transcription of audio buffer.
| samples | Raw audio buffer. |
| frequency | Audio sample rate. |
| channels | Audio channels count. |
| param | Whisper inference parameters. |
|
inlinestatic |
Loads whisper model from byte buffer.
|
inlinestatic |
Start async loading of whisper model from byte buffer.
|
inlinestatic |
Loads whisper model from file path.
| modelPath | Absolute file path to model weights. |
|
inlinestatic |
Start async loading of whisper model from file path.
| modelPath | Absolute file path to model weights. |
|
static |
|
get |
Checks if currently loaded whisper model supports multilingual transcription.
| OnNewSegmentDelegate Whisper.WhisperWrapper.OnNewSegment |
Raised when whisper transcribed a new text segment from audio.
Use MainThreadDispatcher for handling event in Unity main thread.
| OnProgressDelegate Whisper.WhisperWrapper.OnProgress |
Raised when whisper made some progress in transcribing audio. Progress changes from 0 to 100 included.
Use MainThreadDispatcher for handling event in Unity main thread.