csdcorp / speech_to_text

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

I can use a Audio File to recongnize? #29

Closed YuriSousaOliveira closed 3 years ago

YuriSousaOliveira commented 4 years ago

Hello everyone,

I Want to realize speech to text in one file that I save, is it posible? If no, Can I save the audio and recognize in the same time?

If some of this are posible, can someone send me a example?

Thanks. Best Regards.

sowens-csd commented 4 years ago

Unfortunately no to both, but it's a great feature idea. I'll add it to the list for the plugin.

YuriSousaOliveira commented 4 years ago

But can I use a audio file to speech recognize?

sowens-csd commented 4 years ago

No, currently only directly from the microphone. I can add the functionality but it does not do it now.

YuriSousaOliveira commented 4 years ago

If you add this functionality, how much time do you will finish it? Because I want to do this, in my new App, for get the time what colaborater enter in the job, and to validate it, I have to recognize what they said and save this audio

Now I save the audio and I want to validate it.

Do you have some idea for me do this?

sowens-csd commented 4 years ago

The iOS implementation looks fairly simple but the Android version will be less so. I wouldn't expect any of this functionality in the plugin until next week at the earliest. I might draft something in iOS before that but not Android.

Other alternatives would be to use one of the online services from AWS, Google or Azure to handle the transcription for you. They support sending speech fragments and getting transcriptions back. Here's a reference to the AWS service for example: https://aws.amazon.com/transcribe/

YuriSousaOliveira commented 4 years ago

Yes, but it would be work in offline.

konstantin-mohin commented 4 years ago

yeah, it's two features nice to have:

  1. Recognition from audio file;
  2. Record speech (during recognition);
ghost commented 4 years ago

This would be great!

WillOliveiraa commented 4 years ago

This would be great!²

assefseer commented 4 years ago

Hi Stephen @sowens-csd
Is this feature available now ...

  1. Recognition from audio file;
  2. Record speech (during recognition);

If yes: can we have example please if No: when did you plan to do it Appreciate your superior efforts and work. all thanks.

sowens-csd commented 4 years ago

No, not yet. This functionality does not seem to be well supported on Android based on my initial research so I'm trying to decide whether it can be implemented. No date yet since I'm not confident of feasibility.

assefseer commented 4 years ago

Thanks for your prompt response ... I have two ideas that can help solving the issues: 1- can iOS/android keyboard dictation be embedded in flutter app... that will solve the issue

2-can you please help in google speech-to-test flutter implementation ... that could resolve our needs. speech-to-test flutter need a working example please in GitHub.

appreciate your time and help

sowens-csd commented 4 years ago

1- Do you mean from the keyboard or separately? This is already available from the keyboard so I'm guessing you mean a way to trigger that without having to use the keyboard? That is an interesting idea.

2- By 'google speech-to-text flutter implementation' do you mean using their online services as opposed to the built-in Android services? I have considered adding Google / AWS / Azure speech recognition to the plugin but all of them have a cost associated with them.

assefseer commented 4 years ago
  1. Yes I mean to have it like custom keyboard... where we can have the mic icon and text view field on app .. when click the mic and speak the text will show.. but using the dictation of original iOS and android.

  2. no I mean as stand alone... since you are facing issues in the audio file recognition .. in the plugin... as quick solution can you explain how can we use the google speech-to-text api in flutter .. so we can launch our project ( working example of flutter app with audio file recognized by google speech-to-text api will be great help.)

sowens-csd commented 4 years ago

I'm not sure I understand your point 2 above. The plugin does currently use the google speech to text api in flutter. The problem is that I don't believe that API supports recognition from a file. All the references I've found so far point to using a Cloud provider or 3rd party API to achieve that.

sowens-csd commented 3 years ago

Since this would only be possible in iOS I'm not going to implement and so will close this issue.