
# Whisper-Tiny model in Unity Sentis Format

This is the [Whisper Tiny](https://huggingface.co/openai/whisper-tiny) model tested to work in Unity 2023. It is a speech-to-text model. You feed in a 16kHz wav file and it outputs the best guess for what was said in the audio.

## How to Use
* Open a new scene in Unity 2023
* Import package ``com.unity.sentis`` from the package manager.
* Put the `RunWhisper.cs` on the Main Camera
* Put the *.sentis files and the `vocab.json` in the Assets/StreamingAssets folder
* Add a 16kHz mono audio file up to 30 seconds long to your project and drag on to the audioClip field.
* **IMPORTANT:** The audio must be 16kHz. In the audio inspector select "Force Mono". And "Decompress on Load".
* You can add a step to convert 44kHz or 22kHz audio to 16kHz with [this model](https://huggingface.co/unity/sentis-audio-frequency-to-16khz)

When you press play the transcription of the audio will be displayed in the console window.
{"license": "apache-2.0", "library_name": "unity-sentis", "pipeline_tag": "automatic-speech-recognition"}
unity-sentis automatic-speech-recognition license:apache-2.0 region:us