|
| 1 | +import "@typespec/json-schema"; |
| 2 | + |
| 3 | +using TypeSpec.JsonSchema; |
| 4 | + |
| 5 | +@summary("LanguagesBase") |
| 6 | +model LanguagesBase { |
| 7 | + @doc("Any arbirary name for the language object.") |
| 8 | + name: string; |
| 9 | + |
| 10 | + @doc("The language code for the ai to hear. For example, 'fr-FR'.") |
| 11 | + code: string; |
| 12 | + |
| 13 | + @doc("Voice to use for the language. For example, 'fr-FR-Neural2-B'.") |
| 14 | + voice: string; |
| 15 | + |
| 16 | + @doc("The model to use for the specified TTS engine. For example, 'arcana'.") |
| 17 | + _model?: string; |
| 18 | + |
| 19 | + @doc(""" |
| 20 | + Enables emotion detection for the set TTS engine. This allows the AI to express emotions when speaking. |
| 21 | + A global emotion or specific emotions for certain topics can be set within the prompt of the AI. |
| 22 | + IMPORTANT: Only works with [`Cartesia`](/voice/getting-started/voice-and-languages#cartesia) TTS engine. |
| 23 | + """) |
| 24 | + emotion?: "auto"; |
| 25 | + |
| 26 | + @doc(""" |
| 27 | + The speed to use for the specified TTS engine. This allows the AI to speak at a different speed at different points in the conversation. |
| 28 | + The speed behavior can be defined in the prompt of the AI. |
| 29 | + IMPORTANT: Only works with [`Cartesia`](/voice/getting-started/voice-and-languages#cartesia) TTS engine. |
| 30 | + """) |
| 31 | + speed?: "auto"; |
| 32 | + |
| 33 | + #deprecated "The `engine` property is deprecated. Please include the engine in the voice field." |
| 34 | + @doc("The engine to use for the language. For example, 'elevenlabs'.") |
| 35 | + engine?: string; |
| 36 | +} |
| 37 | + |
| 38 | +@summary("LanguagesWithSoloFillers") |
| 39 | +model LanguagesWithSoloFillers is LanguagesBase { |
| 40 | + #deprecated "The `fillers` property is deprecated. Please use `function_fillers` and `speech_fillers` instead." |
| 41 | + @doc("An array of strings to be used as fillers in the conversation. This will be used for both speech and function fillers if provided.") |
| 42 | + fillers?: string[]; |
| 43 | +} |
| 44 | + |
| 45 | +@summary("LanguagesWithFillers") |
| 46 | +model LanguagesWithFillers is LanguagesBase { |
| 47 | + @doc("An array of strings to be used as fillers in the conversation when calling a `swaig function`. This helps the AI break silence between responses. The filler is played asynchronously during the function call.") |
| 48 | + function_fillers?: string[]; |
| 49 | + |
| 50 | + @doc("An array of strings to be used as fillers in the conversation. This helps the AI break silence between responses.") |
| 51 | + speech_fillers?: string[]; |
| 52 | +} |
| 53 | + |
| 54 | +@summary("languages") |
| 55 | +union Languages { |
| 56 | + LanguagesWithSoloFillers, |
| 57 | + LanguagesWithFillers, |
| 58 | +} |
0 commit comments