xuegao-tzx / whisper_flutter_new

A flutter library for offline speech-to-text conversion which use whisper.cpp models implementation for Android、iOS、macOS.
https://pub.dev/packages/whisper_flutter_new
GNU General Public License v3.0
16 stars 5 forks source link

What record package for flutter should I use? #3

Open AllenDang opened 4 months ago

AllenDang commented 4 months ago

I tried https://pub.dev/packages/record, but always get a 44 kHz wav no matter what sample rate I set. What record package could generate 16 kHz wav audio?

xuegao-tzx commented 4 months ago

I use the ffmpeg library to achieve the conversion. You can see the sample code for details.

AllenDang commented 4 months ago

got it, thanks, I get it works. but the transcription speed is kind of slow, using small model for a 3 sec audio will takes 18 secs to finish.

xuegao-tzx commented 4 months ago

yes, I also found this problem, but there is no good solution at present. You can try to implement this new method to see the speed. You can try to use this android app or this ios app. After registering and logging in, send a voice message through this app. When there is no network, the local model voice-to-text will be used. When there is a network, the API will be called for voice-to-text. You can take a look at the online and offline conversion time.

xmanatee commented 1 month ago

See https://github.com/xuegao-tzx/whisper_flutter_new/issues/4#issuecomment-2376677989