I made an interesting observation.
I write a simple app. Basically it do this:
Code Block Swiftlet voices = AVSpeechSynthesisVoice.speechVoices() |
for voice in voices{ |
let utterance = AVSpeechUtterance(string: "Hi") |
utterance.voice = voice |
synthesizer.speak(utterance) |
} |
When I run it I observe various phenomena. Some voices simply works, some crashed, some throws epic warnings:
Code Block Siri TTS for certain Indian celebs isn't correct |
`
And one give very interesting message:
Code Block [AXTTSCommon] Error (hex)80000004 at /Library/Caches/com.apple.xbs/Sources/TextToSpeech/TextToSpeech-421.5/TextToSpeechBundleSupport/TTSVocalizer.m:264 (loading resource) (file:///private/var/MobileAsset/AssetsV2/com_apple_MobileAsset_VoiceServices_VoiceResources/a90d1e0d5bdcf4e8df75585d4843cd6006ba7cf3.asset/AssetData/vocalizer-user-rules-compact.dat) |
I analyzed this
comapple
MobileAssetVoiceServices
VoiceResources directory and find it very interesting. It contains mostly pronunciation dictionaries, for example:
Code Block /\bMelania(?= Trump)\b/ --> "\e/+m$.'lA.ni.^\e/+" |
/\bJoss Whedon\b/ --> "\e/+'d&ZA+s_'wi.dn%)\e/+" |
/\bJean-Claude Van Damme\b/ --> "\e/+'ZAn_'klOd_'v@n_'d@m\e/+" |
And one very interesting file com
appleMobileAsset
VoiceServicesVoiceResources.xml, this file exist also at URL
https://mesu.apple.com/assets/com_apple_MobileAsset_VoiceServices_VoiceResources/com_apple_MobileAsset_VoiceServices_VoiceResources.xml.This file contains entries like this:
Code Block xml<key>_CompressionAlgorithm</key> |
<string>zip</string> |
<key>_DownloadSize</key> |
<integer>83658</integer> |
<key>_IsZipStreamable</key> |
<true/> |
<key>_MeasurementAlgorithm</key> |
<string>SHA-1</string> |
<key>_UnarchivedSize</key> |
<integer>210944</integer> |
<key>__BaseURL</key> |
<string>http://updates-http.cdn-apple.com/2020/mobileassets/001-72580/C130C5C5-9C87-42F9-90BC-83CB9BE97872/</string> |
<key>lastTimeChecked</key> |
<date>2021-01-20T23:48:18Z</date> |
So, for example, If they find some Indian celebrity they forgot about then they don't have to do an iOS upgrade, they simply modify VoiceResources.xml on the server and it will soon or later propagate for all iOS devices on the planet.
My hypothesis is that the latest update contains some bug. That might even be right because the crashes started on January 19 and that's also the date the mesu.apple.com returns for VoiceResources.xml (Last-Modified: Tue, 19 Jan 2021 19:28:19 GMT). If my hypothesis is correct the fix should be rather simple and should appear within a few days.
Please Mr. Frameworks Engineer very much, correct this, our customers will devour us if it lasts more than a few days!