You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f40c46e
Browse filesBrowse the repository at this point in the historyBrowse files
if body.contains("quota_exceeded"){return.outOfCredit }
18
+
switch statusCode {
19
+
case401,402,403:return.refused
20
+
default:returnnil
21
+
}
22
+
}
23
+
24
+
/// Said once, after the reply it interrupted. The path is spoken as words: a wearer who is not
25
+
/// looking at the phone has to be able to find it later from memory.
26
+
varspokenLine:String{
27
+
switchself{
28
+
case.outOfCredit:
29
+
returnString(localized:"By the way, your ElevenLabs credit has run out, so I'm using the built-in voice. You can change voices in the app's Settings, under Connections, then Services and Integrations.")
30
+
case.refused:
31
+
returnString(localized:"By the way, ElevenLabs refused the voice request, so I'm using the built-in voice. Check the key and voice in the app's Settings, under Connections, then Services and Integrations.")
32
+
}
33
+
}
34
+
35
+
/// The same news for the screen.
36
+
varbanner:String{
37
+
switchself{
38
+
case.outOfCredit:
39
+
returnString(localized:"ElevenLabs is out of credit, so replies use the built-in voice. Change voices in Settings › Connections › Services & Integrations.")
40
+
case.refused:
41
+
returnString(localized:"ElevenLabs refused the voice request, so replies use the built-in voice. Check the key and voice in Settings › Connections › Services & Integrations.")
42
+
}
43
+
}
44
+
}
45
+
46
+
/// When a rejection is worth saying aloud. Once per episode, not once per launch: a wearer who has
47
+
/// decided to live with the built-in voice should not be told again every morning. The episode ends
48
+
/// when the cloud voice speaks again or the wearer changes the key or voice.
0 commit comments