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

Can "result" be list of strings instead of a string? #23

Closed peterweb2005 closed 4 years ago

peterweb2005 commented 4 years ago

thanks

sowens-csd commented 4 years ago

What list are you looking for? Each recognition session returns only a single string so I'm not sure what you'd like the contents of the list to be.

peterweb2005 commented 4 years ago

thanks

previously, i needed the result list of strings and to find which one of the words my program need

because some words may sound very alike

        final ArrayList<String> results = bundle.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
        log.trace("results = {}", results);
sowens-csd commented 4 years ago

Thanks, I understand now. I'm only returning the highest confidence value (I think) and should be giving back all of the values when available. I'll have a look at adding a different way to access the results in an update to the lib.

karincayazilim commented 4 years ago

Hello; I needed a list of results instead of a single result. Google returns the 5 most recent results. is it possible to be this way

karincayazilim commented 4 years ago

Is it possible to give in which language he speaks as a parameter? (Locale)

sowens-csd commented 4 years ago

Yes, I'm going to be adding a list as an option in the next release of the plugin.

The locale is an input parameter, I could echo it in the output if that would be helpful? I don't believe that either Android or iOS will detect the language, they have to be told.

karincayazilim commented 4 years ago

thanks for your feedback. Although I have set English in some packages, it also perceives me to speak Turkish. I don't want this, but I think it's not possible

sowens-csd commented 4 years ago

There's an early version of the ability to retrieve the list of transcriptions on master now. If anyone is curious please give it a try. It's not yet used in the example app but it is documented in the change log, and in the API docs. See SpeechRecognitionResult.alternates to get started. It should be fully backwards compatible.

This will be released as 0.8.0 as soon as I've done some testing.

karincayazilim commented 4 years ago

i waiting 0.8.0

Ccastillo06 commented 4 years ago

Hey @sowens-csd thanks so much for implementing this feature! This plugin is awesome and pretty easy to implement compared to the ones I tested! 🚀

sowens-csd commented 4 years ago

Hey @sowens-csd thanks so much for implementing this feature! This plugin is awesome and pretty easy to implement compared to the ones I tested! 🚀

Thanks so much for the feedback! Very nice to hear.

sowens-csd commented 4 years ago

Released as 0.8.0 now. All feedback welcome.