There is a problem, when you call YandexTextToSpeech and an audio isn't playing, then application crashes. Also when you call AVAudioPlayer.stop the .AVPlayerItemDidPlayToEndTime notification isn't called and YandexTextToSpeech freezes.
That's why we decided to use AVPlayer, which is safer and more flexible.
In AimyboxConcrete I replaced setting speaking state to the speechSequenceStarted event, because there is a little delay between calling Aimybox.speak and speechSequenceStarted.
I added public init to YandexSynthesisConfig to be able to configure my own configuration with different voice etc.
There is a problem, when you call
YandexTextToSpeech
and an audio isn't playing, then application crashes. Also when you callAVAudioPlayer.stop
the.AVPlayerItemDidPlayToEndTime
notification isn't called andYandexTextToSpeech
freezes. That's why we decided to useAVPlayer
, which is safer and more flexible.In
AimyboxConcrete
I replaced setting speaking state to thespeechSequenceStarted
event, because there is a little delay between callingAimybox.speak
andspeechSequenceStarted
.I added public init to YandexSynthesisConfig to be able to configure my own configuration with different voice etc.