, , , , .
CocoaSpeechSynthesis , . , 333, 333.3, .
, -, , .
, - - , , , 3 SpeechSynthesizer:
diff --git a/AudioKit/Common/Nodes/Generators/Speech Synthesizer/AKSpeechSynthesizer.swift b/AudioKit/Common/Nodes/Generators/Speech Synthesizer/AKSpeechSynthesizer.swift
index 81286b8fb..324966e13 100644
--- a/AudioKit/Common/Nodes/Generators/Speech Synthesizer/AKSpeechSynthesizer.swift
+++ b/AudioKit/Common/Nodes/Generators/Speech Synthesizer/AKSpeechSynthesizer.swift
@@ -47,7 +47,7 @@ open class AKSpeechSynthesizer: AKNode {
return
}
AKLog("Trying to set new rate")
- let _ = SetSpeechProperty(speechChannel, kSpeechRateProperty, newRate as NSNumber?)
+ let _ = SetSpeechProperty(speechChannel, kSpeechRateProperty, newRate.rounded() as NSNumber?)
}
}
@@ -70,7 +70,7 @@ open class AKSpeechSynthesizer: AKNode {
return
}
AKLog("Trying to set new freq")
- let _ = SetSpeechProperty(speechChannel, kSpeechPitchBaseProperty, newFrequency as NSNumber?)
+ let _ = SetSpeechProperty(speechChannel, kSpeechPitchBaseProperty, newFrequency.rounded() as NSNumber?)
}
}
@@ -93,7 +93,7 @@ open class AKSpeechSynthesizer: AKNode {
return
}
AKLog("Trying to set new modulation")
- let _ = SetSpeechProperty(speechChannel, kSpeechPitchModProperty, newModulation as NSNumber?)
+ let _ = SetSpeechProperty(speechChannel, kSpeechPitchModProperty, newModulation.rounded() as NSNumber?)
}
}
3 Swift.