flutter_tts icon indicating copy to clipboard operation
flutter_tts copied to clipboard

a few questions on votes

Open FetFrumos opened this issue 2 years ago • 7 comments

thanks for the great package. I have a few questions. 1.How to get a list of voices with their names? I use this method getVoices, this is the result:

image

But I was expecting to see the name of the voice in the form of the name "Karen"(as example). maybe there is another method?

  1. How do I know the current voice? is there a method for this?

FetFrumos avatar Jan 01 '22 17:01 FetFrumos

@FetFrumos those are the name and locales coming from the native TTS engine on the device. I'm assuming your output is from Android as it will differ from iOS.

dlutton avatar Jan 02 '22 20:01 dlutton

thanks, how do I know which voice is used by default?

FetFrumos avatar Jan 03 '22 09:01 FetFrumos

@FetFrumos for Android, there is a default that's set already depending on the locale/language being used. Android does have a getDefaultVoice - https://developer.android.com/reference/android/speech/tts/TextToSpeech#getDefaultVoice() which I can add to this package if you'd like, I'm not sure if iOS has something similar.

dlutton avatar Jan 03 '22 19:01 dlutton

yes, add it please

FetFrumos avatar Jan 05 '22 08:01 FetFrumos

I'm having the same problem, I need to get the default Voice, any progress now?

daiweiqiang6688 avatar Feb 20 '22 13:02 daiweiqiang6688

@daiweiqiang6688 do you need this on Android, iOS, or both? I haven't seen anything similar on iOS, but I can quickly implement it for Android if you only need it there.

dlutton avatar Feb 22 '22 05:02 dlutton

@dlutton Thank you for your reply. I think both platforms are needed if possible. I'm writing an application that allows the user to modify parameters such as voice, speech rate, etc. So it needs to show the current default voice used, and when modified, it can be restored to the default voice by clicking the "restore default" button. So it is necessary to get the default voice, or is there any other solution?

daiweiqiang6688 avatar Feb 22 '22 06:02 daiweiqiang6688

Hi @dlutton, is this method added in plugin(for android)?

FetFrumos avatar Sep 01 '22 18:09 FetFrumos

sorry for the delay @FetFrumos, but I have just added the feature. I could only find this feature on Android though so it's not supported on iOS right now. This has been added to 3.5.3.

dlutton avatar Sep 06 '22 02:09 dlutton