Post

Replies

Boosts

Views

Activity

Reply to iPadOS 14 beta 8: AVSpeechSynthesisVoice.speechVoices() returns voices with emtpy names
The workaround im going with. Uppercase the piece of the identifier and remove any that start with siri_ and don't have readable names extension AVSpeechSynthesisVoice { 		var hackName: String { 				if !name.isEmpty { 						return name 				} 				guard let start = identifier.range(of: ".", options: .backwards)?.upperBound else { 						return name 				} 				let n = String(identifier[start...]) 				guard let end = n.range(of: "-", options: .backwards)?.lowerBound else { 						return n 				} 				let x = String(n[n.startIndex...end]).replacingOccurrences(of: "-", with: "") 				return String(x) 		} } Then when I display a list of voices to the user I filter out any that start with "siri_"
Sep ’20