Questions tagged [avspeechutterance]
45 questions
16
votes
2 answers
Playing sound in didReceiveRemoteNotification, while in the background, using text to speech feature
What I am trying currently is to play a message when app receives remote notification while in the background (or likely woken up from a suspended state).
The sound is not playing at all after the app is woken from a suspended mode.
When application…

Whirlwind
- 14,286
- 11
- 68
- 157
7
votes
0 answers
Unable to copy asset attributes console error - AVSpeechSynthesizer
My console is getting spammed with these errors:
[MobileAssetError:1] Unable to copy asset attributes
Could not get attribute 'LocalURL': Error Domain=MobileAssetError Code=1 "Unable to copy asset attributes"
UserInfo={NSDescription=Unable to…

Whirlwind
- 14,286
- 11
- 68
- 157
5
votes
3 answers
Text to Speech API (AVSpeechSynthesisVoice) broken in iOS 13 GM
Update
I installed the iOS 13 GM on a different device, and did not encounter this issue. So I'm no longer sure if this is specific to the iOS 13 GM, or something about the way I installed it. On the first device (an iPhone X), I did an upgrade…

Chris Vasselli
- 13,064
- 4
- 46
- 49
4
votes
1 answer
SpeechSynthesizer doesn't give the natural pause for full-stop in Swift
I am working on a text to speak task. In which I am facing problem that if I got the text for example: Hello everyone. 2 minutes to go. Then using code below for speech synthesizer, It considers whole text as one sentence and doesn't give a natural…

Umair Aamir
- 1,624
- 16
- 26
4
votes
1 answer
Does anyone know if AVSpeechUtterance supports SSML?
Was wondering if anyone knew if AVSpeechUtterance supports SSML?

Frank
- 3,073
- 5
- 40
- 67
3
votes
0 answers
AVSpeechUtterance volume low while AVAudioSession in .playAndRecord
I have a use case where I've to play speech utterances and audio files in an ongoing video call.
I'm using Agora for the video call.
Issue:- The sound of speech utterance and audio file playing is very low
Observations:-
While in video call the…

SPS
- 359
- 3
- 12
3
votes
1 answer
Different voices in Text to Speech iOS app
I have a Text to Speech App and all is good, but I was looking for a voice.
In Settings/Accessibility/Voice Over/Speech/Voice there is a list of voices. I wanted to select one of those, for example "Susan (Enhanced)". How would I go about doing…

LilMoke
- 3,176
- 7
- 48
- 88
3
votes
1 answer
Detect ongoing speech from AVSpeech and AVUtterance in Swift
I gather you can use a delegate method to tell when AV speech has finished
extension MyViewController: AVSpeechSynthesizerDelegate {
func speechSynthesizer(synthesizer: AVSpeechSynthesizer, didFinishSpeechUtterance utterance:…

user6631314
- 1,751
- 1
- 13
- 44
3
votes
1 answer
AVAudioSession issue when using SFSpeechRecognizer after AVSpeechUtterance
am trying to use SFSpeechRecognizer for speech to text, after speaking a welcome message to the user via AVSpeechUtterance. But randomly, the speech recognition does not start(after speaking the welcome message) and it throws the error message…

csharpnewbie
- 789
- 2
- 12
- 33
2
votes
0 answers
AVSpeechSynthesizer iOS 15/16 lagging for seconds when switching to (different) German language voice
Whenever switching the AVSpeechSynthesizer voice to a (different) German voice the app waits/hangs for a few seconds (depending on device) before speech output starts.
Looking into the console output I see that the German language rules data is five…

KlausM
- 193
- 12
2
votes
1 answer
AVSpeechUtterance: how to fetch a random array and use a specific voice?
While working at using Swift to spew forth quotations, I'm running into issues with the repetition of the same command.
Here's what I have right now
import AVFoundation
import PlaygroundSupport
PlaygroundPage.current.needsIndefiniteExecution =…

esaruoho
- 896
- 1
- 7
- 25
2
votes
2 answers
Force custom pronunciation of words in AVSpeech and AVSpeechUtterance in Swift
For speaking out numbers with an AVSpeechUtterance, I would like Siri to speak numbers in ways that respect the convention for the type of number.
For a date, I would like it to pronounce 1492 as fourteen ninety two rather then one thousand, four…

user6631314
- 1,751
- 1
- 13
- 44
2
votes
2 answers
AVSpeechUtterance en-US voice sounds garbled on iOS 12
I have an app that uses AVSpeechUtterance which has been working fine until iOS 12. It still works but the en-US voice sounds garbled. This doesnt happen on the xcode simulator or on the new iPhone XS Max. It seems to only happen on iPhone X. …

ijason03
- 571
- 2
- 9
- 26
2
votes
0 answers
AVSpeechSynthesizer and memory leaks in Xcode Instruments
Every time I use speech synthesizer, Instruments reports memory leaks. Hiding system libraries in the Call Tree section leaves no entries in the call tree display. I understand that the leaks are caused by some system call. Or am I missing…

kotyara
- 71
- 1
- 5
2
votes
1 answer
Swift - Reset/Restart SpeechSynthesizer after it finishes
I'm coding an app to read random study questions to students.
The basic flow is:
Generate random question
Assign the text to a SpeechUtterrance
Play the SpeechUtterance with the SpeechSynthesizer
Get the student's answer
Check it
Generate a new…

Nathaniel Hatfield
- 41
- 2