mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
When enabling ultra realistic voices, if granted select a default voice
This commit is contained in:
parent
1613af79a6
commit
98df7164e5
2 changed files with 8 additions and 2 deletions
|
|
@ -28,6 +28,12 @@ import Views
|
|||
audioController.useUltraRealisticVoices = true
|
||||
audioController.ultraRealisticFeatureRequested = true
|
||||
audioController.ultraRealisticFeatureKey = feature.granted ? feature.token : ""
|
||||
if feature.granted, !Voices.isUltraRealisticVoice(audioController.currentVoice) {
|
||||
// Attempt to set to an ultra voice
|
||||
if let voice = Voices.UltraPairs.first {
|
||||
audioController.currentVoice = voice.firstKey
|
||||
}
|
||||
}
|
||||
self.realisticVoicesToggle = true
|
||||
} else {
|
||||
audioController.useUltraRealisticVoices = false
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ public enum VoiceCategory: String, CaseIterable {
|
|||
}
|
||||
|
||||
public struct VoicePair {
|
||||
let firstKey: String
|
||||
public let firstKey: String
|
||||
let secondKey: String
|
||||
|
||||
let firstName: String
|
||||
public let firstName: String
|
||||
let secondName: String
|
||||
|
||||
let language: String
|
||||
|
|
|
|||
Loading…
Reference in a new issue