exPHAT / SwiftWhisper

🎤 The easiest way to transcribe audio in Swift
MIT License
593 stars 63 forks source link

More boilerplate besides the test functions. #27

Closed shyamalschandra closed 1 year ago

shyamalschandra commented 1 year ago

Hi @exPHAT, do you have more example code with all the boilerplate to get started with using the CoreML model, the delegates, and the PCM Array to whisper.cpp STT? Thanks, @shyamalschandra!

I can do trial-and-error but it is much easier to have boilerplate.

exPHAT commented 1 year ago

SwiftWhisperExample.zip

Here's a very basic example I made for you. Drag in any of the prebuilt models and call it model.bin.

You can also drag in a prebuilt core ML model with the correct name (as described in the README) and it will use that.

shyamalschandra commented 1 year ago

Hi @exPHAT,

I finally got the code working but it is really slow with tiny.en.bin. Is this normal in Debug mode?

Also, is WhisperDelegate implemented fully because I want to update my ProgressBar with the progress of the speech recognition?

Thank you again!

exPHAT commented 1 year ago

Yes. Please read the README for info about speed boosts.

The delegate is fully implemented.