From 6c0c8e8d264bd46eb12b0aef0a5be8957f49d9f0 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 12 Sep 2022 12:45:29 +0800 Subject: [PATCH] Send rate as a string --- .../Sources/Services/AudioSession/SpeechSynthesizer.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apple/OmnivoreKit/Sources/Services/AudioSession/SpeechSynthesizer.swift b/apple/OmnivoreKit/Sources/Services/AudioSession/SpeechSynthesizer.swift index 816add96c..d30e15305 100644 --- a/apple/OmnivoreKit/Sources/Services/AudioSession/SpeechSynthesizer.swift +++ b/apple/OmnivoreKit/Sources/Services/AudioSession/SpeechSynthesizer.swift @@ -15,7 +15,7 @@ struct UtteranceRequest: Codable { let text: String let voice: String let language: String - let rate: Double + let rate: String } struct Utterance: Decodable { @@ -26,7 +26,7 @@ struct Utterance: Decodable { public let wordCount: Double func toSSML(document: SpeechDocument) throws -> Data? { - let request = UtteranceRequest(text: text, voice: voice ?? document.defaultVoice, language: document.language, rate: 1.1) + let request = UtteranceRequest(text: text, voice: voice ?? document.defaultVoice, language: document.language, rate: "1.1") return try JSONEncoder().encode(request) } }