Post

Replies

Boosts

Views

Activity

Reply to TTS Alex voice is treated like available when it's actually not
I'm seeing the same issue here AVSpeechSynthesisVoice.speechVoices() returns the Alex voice. let voice = AVSpeechSynthesisVoice(identifier: AVSpeechSynthesisVoiceIdentifierAlex) returns the Alex voice (I checked the identifier, name etc. on the returned instance, BUT voice?.audioFileSettings is an empty dict). But the voice actually used is Samantha (my device default). Checking my device Settings > Accessibility > Spoken Content > English shows that Alex isn't even downloaded. Some more observations I made: I've never manually downloaded the Alex voice on this device. Debugging the voice details for the Alex voice returns an empty Dictionary for voice?.audioFileSettings, while all other "available" voices will return a non-empty dict After downloading Alex voice?.audioFileSettings does indeed return a non-empty dictionary Using the no param constructor AVSpeechSynthesisVoice() will print an error message [AXSpeechAssetDownload] Could not find any name for this voice: (null) but it will return a non-nil voice, which has no language, name or identifier set. AVSpeechSynthesizer uses Samantha (device-default) in that case as well. Bottom line, to check if Alex is really installed, check if voice?.audioFileSettings is a non-empty dict
Aug ’21