AVSpeechSynthesizer voices on iOS 8 - ios

Is anyone else unable to use the AVSpeechSynthesizer with a voice other than "en-US"? The array that gets returned when I call AVSpeechSynthesisVoice speechVoices still returns the complete list that can be seen in iOS 7, but none of them actually work.
I tried looking through the known issues on the iOS 8 release notes, but didn't see anything about this. Hopefully this is something that will be fixed in the full version, as I have a couple apps that make use of multiple voices.

IMHO, this is a bug in iOS8, even for GM.
I was playing with this project: https://github.com/mattt/AVSpeechSynthesizer-Example
My findings are:
1) iOS 8 did not speak in any simulator (XCode 6GM, XCode 6.1b2). It did speak only on real device.
2 ) iOS 8 did speak in language of phone (Russian in my case) and English (en-US). When i did change Language of a phone to german, i can hear German and English TTS. Adding German as one of languages in preffered language list did not help, you should set language as phone language. For unknow reasons Russian did work even if it was not phone language, but not same for German - it was working only if it was set as a phone language. Maybe real location matters (I am in Russia). For sure: iOS8 did "optimize" TTS engines some way, so not all of them are ok to use.
3) some folks noticed another bug in iOS 8: first attempt to use AVSpeechSynthesizer produces silence. See workaround here.

This problem appears to have been fixed in iOS 8.1.

Related

iOS 13: How to obtain general device language?

Prior to iOS 13 it was possible to call Locale.preferredLanguages.first to get general device language, but iOS 13 introduced app-specific languages. The problem is that if you select an app-specific language that doesn't match language in preferredLanguages then it will be pushed to the beginning of the array, but if you select the language that matches the language that contains in preferredLanguages then this language will stay on it place. So, starting with iOS 13 we cannot be really sure that the first language in preferredLanguages is indeed general device language and also the way that the array gets updated is really weird. I'm thinking about this problem for the entire day but cannot find the solution. Maybe someone knows the way to get general device language on iOS 13 device? Thanks

Linguistic schemes got removed from old devices

I'm using NSLinguisticTagger for my application and it was working fine across all devices with iOS 11 and above. Recently, the 2 older devices (6s and iPad mini) stopped recognizing the tags, only returned "Other" tag.
On a different thread, someone said that "Somehow my phone felt I "didn't need" all the schemes and got rid of them one day. I uninstalled English then added it again and now it works". So I tried it and it worked on both devices. (I just switched from English U.K to English U.S) but I don't think that the chosen language itself matters.
I can't reproduce the issue anymore since it's fixed, but really want to know WHY that solution fixed that??

AVSpeechSynthesizer iOS 8 Issues

Since upgrading to xCode 6 and iOS 8 I've noticed serious issues with AVSpeechSynthesizer. Prior to the upgrade, it worked perfectly, but now, several issues have risen.
Speech Utterances are playing at a much faster rate then how they were prior to upgrade.
When I queue up 2 speech utterances, it simply skips over the first utterance and plays the second one first. (This only occurs on the first run of the speech synthesizer. The second run and on works properly.)
Please, any help would be greatly appreciated. Thanks in advance.
For second issue, see this answer for AVSpeechUtterance - Swift - initializing with a phrase.
As for me - iOS 8 also did not support properly languages other than phone language + english.
upd dec-2014: XCode 6.2 beta2 did resolve issues with TTS in simulator and (maybe) with TTS rate.
It looks to me as though a user can only hear the voice if they have specifically downloaded it in their accessibility settings.
What I have not been able to do is work out how to tell which voices they have downloaded.
I have discovered a horrible hack to make voices that have not been specifically downloaded play.
To do so I had to have two synthesizers running and get one to run through all the voices saying something. Then the other synthesizer could use any of the voices. As I say, this is a horrible hack and I cannot guarantee its reliability. In addition, it may stop working at a future varsion of ios8.
In my own apps I have chosen to make a library and get it to cycle through all the voices. Where they take more than zero time to say a phrase, they are a "good" voice and I offer it to the user. This has the advantage that it is likely to be robust against changes in the ios version.

iOS get serial number of device (iPad) on iOS7

I need to get the serial number of my device. It has to be the serial number and not an uuid or something else.
I'm supervising over 100 iPads with an enterprise app. So i need the serial number for organization reasons. In case my app is not in the app store. I heard that i can use iokit, but i didn't find anything helpful for ios 7 about it.
Is there any good tutorial for iOS7 - IOKit or is there another way to get the serial number?
Thanks in advance!
Here is a working solution from 0xced (thanks to him!):
UIDevice+serialNumber category
Just tried it and it works like a charm, but as he pointed (and you said it's OK), won't be accepted by AppStore.

text to speech iphone app

Good Evening,
I'm looking for a simple text to speech for iphone app development. I see numerous posts about this including ...
Text-to-speech libraries for iPhone
Question though, this link is all third party developers to use text to speech. I thought apple has a class reference to create speech? (nsspeechsynthesizer) Can someone please explain? Does apple not provide this for us?
Thanks
NSSpeechSynthesizer works fine on Mac.VSSpeechSynthesizer is available for the iOS - but it is a private API and as such will likely be rejected from the app store. However you can still make apps for private consumption. I consider this a bug as it makes creating accessible apps for the partially sighted for instance, harder. I have filed Bug ID #: 9451650 Bug Title: VSSpeechSynthesizer is Private.
iOS 7 has the AVSpeechSynthesizer class
As other answers have mentioned, Apple does not include NSSpeechSynthesizer in iOS, only in Mac OS X.

Resources