Open 1ec5 opened 6 years ago
I was just wondering if there was an update to adding gender to the SpeechOptions. I get emails from users and there are lots of nice people who have been asking for male voices. I have added the ability in my apps to use different English accents (UK, US, India, and Australian), but I would love to also be able to be able to also select the gender. Most of the Polly voices have both Male and Female voice options. Do you know when I might have access to the male voices?
Thanks for all the work you all do. Your SDK has really come along nicely!!
I just hardcoded:
options.speechGender = . male
into the fetchAndSpeak method in MapboxVoiceController. Unfortunately, it still speaks in a female voice. I just wanted to see if a male voice was even possible before working out a subclass. Hoping both male and female genders are available in version 1.0.0. It would be a nice option to add and people have been asking for it.
Unfortunately, it still speaks in a female voice.
Can you try again? We did refactor the speech controllers in #2348, so it might have helped. Make sure to modify both SpeechOptions
instances that get created: in MapboxSpeechSynthesizer.fetchAndSpeak(instruction:locale:)
and MapboxSpeechSynthesizer.downloadAndCacheSpokenInstruction(instruction:locale:)
.
@Udumft, is this fixed by #3747?
SpeechSynthesizer
which allows modifying the options used to generate the voice. So yes, I would say that it resolves the ticket.
MapboxVoiceController sets the locale when fetching the audio for a spoken instruction, but the application may also want to set other options, namely the gender via
SpeechOptions.speechGender
. MapboxVoiceController should expose these options somehow, whether through individual properties, aspeechOptions
property set upfront, or a new delegate protocol.https://github.com/mapbox/mapbox-navigation-ios/blob/ef7a5258172fec80db6125966df6708aeb7a5031/MapboxNavigation/MapboxVoiceController.swift#L155-L158
/cc @bsudekum @willwhite