Skip to content

Commit d0b7aca

Browse files
committed
Update elevenlabs schema
1 parent 0944d80 commit d0b7aca

1 file changed

Lines changed: 16 additions & 26 deletions

File tree

src/simulflow/processors/elevenlabs.clj

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[simulflow.async :refer [vthread-loop]]
66
[simulflow.frame :as frame]
77
[simulflow.schema :as schema]
8-
[simulflow.secrets :as secrets]
98
[simulflow.utils.core :as u]
109
[taoensso.telemere :as t])
1110
(:import (java.nio HeapCharBuffer)))
@@ -37,15 +36,6 @@
3736
:language_code language
3837
:output_format (encoding->elevenlabs encoding sample-rate)})))
3938

40-
(comment
41-
(make-elevenlabs-ws-url
42-
{:elevenlabs/api-key (secrets/secret [:elevenlabs :api-key])
43-
:elevenlabs/model-id "eleven_flash_v2_5"
44-
:elevenlabs/voice-id (secrets/secret [:elevenlabs :voice-id])
45-
:voice/stability 0.5
46-
:voice/similarity-boost 0.8
47-
:voice/use-speaker-boost? true}))
48-
4939
(defn begin-stream-message
5040
[{:voice/keys [stability similarity-boost use-speaker-boost?]
5141
:elevenlabs/keys [api-key]
@@ -80,32 +70,32 @@
8070
{:min 32 ;; ElevenLabs API keys are typically long
8171
:secret true ;; Marks this as sensitive data
8272
:description "ElevenLabs API key"}]]
83-
[:elevenlabs/model-id
73+
[:flow/language {:default :en} schema/Language]
74+
[:elevenlabs/model-id {:default :eleven_flash_v2_5
75+
:description "ElevenLabs model identifier"}
8476
(schema/flex-enum
85-
{:default "eleven_flash_v2_5"
86-
:description "ElevenLabs model identifier"}
87-
["eleven_multilingual_v2" "eleven_turbo_v2_5" "eleven_turbo_v2" "eleven_monolingual_v1" "eleven_multilingual_v1" "eleven_multilingual_sts_v2" "eleven_flash_v2" "eleven_flash_v2_5" "eleven_english_sts_v2"])]
77+
[:eleven_multilingual_v2 :eleven_turbo_v2_5 :eleven_turbo_v2 :eleven_monolingual_v1
78+
:eleven_multilingual_v1 :eleven_multilingual_sts_v2 :eleven_flash_v2 :eleven_flash_v2_5 :eleven_english_sts_v2])]
8879
[:elevenlabs/voice-id
8980
[:string
9081
{:min 20 ;; ElevenLabs voice IDs are fixed length
9182
:max 20
9283
:description "ElevenLabs voice identifier"}]]
93-
[:voice/stability
84+
[:voice/stability {:default 0.5
85+
:description "Voice stability factor (0.0 to 1.0)"}
9486
[:double
9587
{:min 0.0
96-
:max 1.0
97-
:default 0.5
98-
:description "Voice stability factor (0.0 to 1.0)"}]]
99-
[:voice/similarity-boost
88+
:max 1.0}]]
89+
[:voice/similarity-boost {:default 0.8
90+
:description "Voice similarity boost factor (0.0 to 1.0)"}
10091
[:double
10192
{:min 0.0
102-
:max 1.0
103-
:default 0.8
104-
:description "Voice similarity boost factor (0.0 to 1.0)"}]]
105-
[:voice/use-speaker-boost?
106-
[:boolean
107-
{:default true
108-
:description "Whether to enable speaker beoost enhancement"}]]])
93+
:max 1.0}]]
94+
[:voice/use-speaker-boost? {:default true
95+
:description "Whether to enable speaker beoost enhancement"}
96+
:boolean]
97+
[:audio.out/encoding {:default :pcm-signed} schema/AudioEncoding]
98+
[:audio.out/sample-rate {:default 16000} schema/SampleRate]])
10999

110100
(defn accumulate-json-response
111101
"Pure function to accumulate JSON response fragments.

0 commit comments

Comments
 (0)