argmaxinc / WhisperKit

On-device Speech Recognition for Apple Silicon
https://takeargmax.com/blog/whisperkit
MIT License
3.17k stars 268 forks source link

Does WhisperKit support simulator? It emits only [silence] on Simulator but on-device is good. #42

Closed muukii closed 6 months ago

ZachNagengast commented 6 months ago

The simulator mic wont work by default, you'll need to change the audio input device to use a physical microphone like an AirPod. More info in this thread: https://stackoverflow.com/a/20090230

muukii commented 6 months ago

@ZachNagengast sorry. I meant using WhisperKit for audio files to make subtitle.

ZachNagengast commented 6 months ago

I understand now, yes I'm also seeing this issue on the simulator. The way to resolve it is by changing the compute units to cpuOnly here: https://github.com/argmaxinc/WhisperKit/blob/a32c947d6a454bda400f699cdb65dc6b150fe63b/Sources/WhisperKit/Core/Models.swift#L131-L135

This may be a good default when detecting we're running on a simulator, what do you think?

muukii commented 6 months ago

@ZachNagengast Cool, that makes sense. I'll try it. Thank you!

muukii commented 6 months ago

the latest release works so good on simulator! thank you. I'm working on making this app for me by the way. This library brings a lot of help into this. https://github.com/muukii/Tone.app