Whisper-Tiny model in Unity 6 with Inference Engine
This is the Whisper Tiny model running in Unity 6 with Inference Engine. It is a speech-to-text model that transcribes 16kHz wav audio to text.
How to Use
- Create a new scene in Unity 6;
- Install
com.unity.ai.inferencefrom the package manager; - Install
com.unity.nuget.newtonsoft-jsonfrom the package manager; - Add the
RunWhisper.csscript to the Main Camera; - Drag the
decoder_model.onnxasset from themodelsfolder into theAudio Decoder 1field; - Drag the
decoder_with_past_model.onnxasset from themodelsfolder into theAudio Decoder 2field; - Drag the
encoder_model.onnxasset from themodelsfolder into theAudio Encoderfield; - Drag the
logmel_spectrogram.onnxasset from themodelsfolder into theLog Mel Spectrofield; - Drag the
vocab.jsonasset from thedatafolder into theVocab Assetfield; - Drag an audio asset, e.g.
data/answering-machine16kHz.wavto theAudio Clipfield. Ensure theNormalizeflag is set on asset import for best results.
Preview
Enter play mode. If working correctly the transcribed audio will be logged to the console.
Inference Engine
Inference Engine is a neural network inference library for Unity. Find out more here.
- Downloads last month
- 156