csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
389 stars 238 forks source link

Is it possible to record the input speech to devices as .wav file while recognizing the same piece of speech? #136

Closed tommycyf closed 4 years ago

tommycyf commented 4 years ago

Hi, everyone.

During the recognition, can I somehow save the input speech and save/play it on my local device?

I tried starting flutter_audio_recorder together with speech_to_text, then flutter_audio_recorder was working but speech_to_text was not, and returning "error_speech_timeout" error. Is this something concerned with audio channel conflicts?

Thanks for sharing this nice speech_to_text package, it really helped me a lot!

sowens-csd commented 4 years ago

No, the package doesn't yet have this capability. Interesting sounding feature though. Was the conflict on Android or iOS? I think it should work on iOS but I haven't found any way to share the input channel on Android yet.

tommycyf commented 4 years ago

The conflict happens on Android. It works perfectly with flutter_audio_recorder on iOS.

https://github.com/felixjunghans/google_speech When I use this package, recognizing and recording can be done at the same time both on iOS and Android.

jtkeyva commented 4 years ago

Recording sound works on iOS 12 with flutter_sound package

https://github.com/dooboolab/flutter_sound/issues/210

sowens-csd commented 4 years ago

The conflict happens on Android. It works perfectly with flutter_audio_recorder on iOS.

https://github.com/felixjunghans/google_speech When I use this package, recognizing and recording can be done at the same time both on iOS and Android.

Sorry, I missed this post. Yes, this works because it's using the Google Speech Api which is a cloud service, not local to the device.

sowens-csd commented 4 years ago

Currently the answer to this question is no, it is not possible on Android.

theflutterguy commented 2 years ago

Has anyone made a workaround on this issue? I have a use case where I need to use flutter_sound and speech_to_text simultaneously. I found over here on Stackoverflow, Quite a old issue.