@supertone/supertone 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +119 -69
  2. package/custom_test/realtime_tts_player.ts +177 -12
  3. package/custom_test/test_pronunciation_dictionary.ts +227 -0
  4. package/custom_test/test_real_api.ts +1677 -162
  5. package/custom_test/test_text_utils_chunk_text_punctuation.ts +55 -0
  6. package/dist/commonjs/lib/config.d.ts +2 -2
  7. package/dist/commonjs/lib/config.d.ts.map +1 -1
  8. package/dist/commonjs/lib/config.js +2 -2
  9. package/dist/commonjs/lib/config.js.map +1 -1
  10. package/dist/commonjs/lib/custom_utils/index.d.ts +1 -0
  11. package/dist/commonjs/lib/custom_utils/index.d.ts.map +1 -1
  12. package/dist/commonjs/lib/custom_utils/index.js +5 -1
  13. package/dist/commonjs/lib/custom_utils/index.js.map +1 -1
  14. package/dist/commonjs/lib/custom_utils/pronunciation_utils.d.ts +24 -0
  15. package/dist/commonjs/lib/custom_utils/pronunciation_utils.d.ts.map +1 -0
  16. package/dist/commonjs/lib/custom_utils/pronunciation_utils.js +145 -0
  17. package/dist/commonjs/lib/custom_utils/pronunciation_utils.js.map +1 -0
  18. package/dist/commonjs/lib/custom_utils/text_utils.d.ts +8 -1
  19. package/dist/commonjs/lib/custom_utils/text_utils.d.ts.map +1 -1
  20. package/dist/commonjs/lib/custom_utils/text_utils.js +125 -7
  21. package/dist/commonjs/lib/custom_utils/text_utils.js.map +1 -1
  22. package/dist/commonjs/models/apiconverttexttospeechusingcharacterrequest.d.ts +92 -1
  23. package/dist/commonjs/models/apiconverttexttospeechusingcharacterrequest.d.ts.map +1 -1
  24. package/dist/commonjs/models/apiconverttexttospeechusingcharacterrequest.js +48 -3
  25. package/dist/commonjs/models/apiconverttexttospeechusingcharacterrequest.js.map +1 -1
  26. package/dist/commonjs/models/predictttsdurationusingcharacterrequest.d.ts +92 -1
  27. package/dist/commonjs/models/predictttsdurationusingcharacterrequest.d.ts.map +1 -1
  28. package/dist/commonjs/models/predictttsdurationusingcharacterrequest.js +46 -3
  29. package/dist/commonjs/models/predictttsdurationusingcharacterrequest.js.map +1 -1
  30. package/dist/commonjs/sdk/texttospeech.d.ts +17 -6
  31. package/dist/commonjs/sdk/texttospeech.d.ts.map +1 -1
  32. package/dist/commonjs/sdk/texttospeech.js +48 -25
  33. package/dist/commonjs/sdk/texttospeech.js.map +1 -1
  34. package/dist/esm/lib/config.d.ts +2 -2
  35. package/dist/esm/lib/config.d.ts.map +1 -1
  36. package/dist/esm/lib/config.js +2 -2
  37. package/dist/esm/lib/config.js.map +1 -1
  38. package/dist/esm/lib/custom_utils/index.d.ts +1 -0
  39. package/dist/esm/lib/custom_utils/index.d.ts.map +1 -1
  40. package/dist/esm/lib/custom_utils/index.js +2 -0
  41. package/dist/esm/lib/custom_utils/index.js.map +1 -1
  42. package/dist/esm/lib/custom_utils/pronunciation_utils.d.ts +24 -0
  43. package/dist/esm/lib/custom_utils/pronunciation_utils.d.ts.map +1 -0
  44. package/dist/esm/lib/custom_utils/pronunciation_utils.js +140 -0
  45. package/dist/esm/lib/custom_utils/pronunciation_utils.js.map +1 -0
  46. package/dist/esm/lib/custom_utils/text_utils.d.ts +8 -1
  47. package/dist/esm/lib/custom_utils/text_utils.d.ts.map +1 -1
  48. package/dist/esm/lib/custom_utils/text_utils.js +125 -7
  49. package/dist/esm/lib/custom_utils/text_utils.js.map +1 -1
  50. package/dist/esm/models/apiconverttexttospeechusingcharacterrequest.d.ts +92 -1
  51. package/dist/esm/models/apiconverttexttospeechusingcharacterrequest.d.ts.map +1 -1
  52. package/dist/esm/models/apiconverttexttospeechusingcharacterrequest.js +47 -2
  53. package/dist/esm/models/apiconverttexttospeechusingcharacterrequest.js.map +1 -1
  54. package/dist/esm/models/predictttsdurationusingcharacterrequest.d.ts +92 -1
  55. package/dist/esm/models/predictttsdurationusingcharacterrequest.d.ts.map +1 -1
  56. package/dist/esm/models/predictttsdurationusingcharacterrequest.js +45 -2
  57. package/dist/esm/models/predictttsdurationusingcharacterrequest.js.map +1 -1
  58. package/dist/esm/sdk/texttospeech.d.ts +17 -6
  59. package/dist/esm/sdk/texttospeech.d.ts.map +1 -1
  60. package/dist/esm/sdk/texttospeech.js +49 -26
  61. package/dist/esm/sdk/texttospeech.js.map +1 -1
  62. package/examples/custom_voices/create_cloned_voice.ts +4 -3
  63. package/examples/custom_voices/delete_custom_voice.ts +2 -7
  64. package/examples/custom_voices/edit_custom_voice.ts +2 -6
  65. package/examples/custom_voices/get_custom_voice.ts +2 -7
  66. package/examples/custom_voices/list_custom_voices.ts +2 -7
  67. package/examples/custom_voices/search_custom_voices.ts +2 -6
  68. package/examples/text_to_speech/create_speech.ts +3 -8
  69. package/examples/text_to_speech/create_speech_long_text.ts +3 -7
  70. package/examples/text_to_speech/create_speech_with_phonemes.ts +3 -7
  71. package/examples/text_to_speech/create_speech_with_voice_settings.ts +3 -8
  72. package/examples/text_to_speech/predict_duration.ts +3 -7
  73. package/examples/text_to_speech/stream_speech.ts +3 -7
  74. package/examples/text_to_speech/stream_speech_long_text.ts +3 -7
  75. package/examples/text_to_speech/stream_speech_with_phonemes.ts +3 -7
  76. package/examples/text_to_speech/stream_speech_with_voice_settings.ts +3 -7
  77. package/examples/usage/get_credit_balance.ts +2 -6
  78. package/examples/usage/get_usage.ts +2 -6
  79. package/examples/usage/get_voice_usage.ts +2 -7
  80. package/examples/voices/get_voice.ts +2 -6
  81. package/examples/voices/list_voices.ts +2 -6
  82. package/examples/voices/search_voices.ts +2 -7
  83. package/jsr.json +1 -1
  84. package/openapi.json +101 -9
  85. package/package.json +1 -1
  86. package/src/lib/config.ts +41 -41
  87. package/src/lib/custom_utils/index.ts +7 -0
  88. package/src/lib/custom_utils/pronunciation_utils.ts +193 -0
  89. package/src/lib/custom_utils/text_utils.ts +138 -7
  90. package/src/models/apiconverttexttospeechusingcharacterrequest.ts +62 -3
  91. package/src/models/predictttsdurationusingcharacterrequest.ts +64 -3
  92. package/src/sdk/texttospeech.ts +99 -68
@@ -7,6 +7,116 @@
7
7
 
8
8
  import { DEFAULT_MAX_TEXT_LENGTH } from "./constants.js";
9
9
 
10
+ /**
11
+ * Sentence-ending punctuation pattern for multilingual support.
12
+ *
13
+ * Supported languages: English, Korean, Japanese, Bulgarian, Czech, Danish,
14
+ * Greek, Spanish, Estonian, Finnish, Hungarian, Italian, Dutch, Polish,
15
+ * Portuguese, Romanian, Arabic, German, French, Hindi, Indonesian, Russian,
16
+ * Vietnamese, Chinese, Thai, and more.
17
+ *
18
+ * Punctuation groups:
19
+ * - ASCII basics: . ! ? ; :
20
+ * - Ellipsis: … (U+2026), ‥ (U+2025)
21
+ * - CJK fullwidth: 。!?;:。、
22
+ * - Arabic/Urdu: ؟ ؛ ۔ ،
23
+ * - Devanagari (Hindi/Sanskrit): । ॥
24
+ * - Greek question mark: ; (U+037E)
25
+ */
26
+ const SENTENCE_PUNCTUATION = ".!?;:…‥。!?;:。、؟؛۔،।॥\u037E";
27
+ const SENTENCE_SPLIT_PATTERN = new RegExp(
28
+ `([${SENTENCE_PUNCTUATION}]+\\s*)`,
29
+ "u"
30
+ );
31
+
32
+ /**
33
+ * Check if text contains spaces (to determine if word-based splitting is possible)
34
+ *
35
+ * @param text - Text to check
36
+ * @returns true if text contains spaces
37
+ */
38
+ function hasSpaces(text: string): boolean {
39
+ return /\s/.test(text);
40
+ }
41
+
42
+ /**
43
+ * Split text by words, ensuring each chunk is under maxLength.
44
+ * Used for languages with spaces (English, Korean, etc.)
45
+ *
46
+ * @param text - Text to split
47
+ * @param maxLength - Maximum length of each chunk
48
+ * @returns Array of text chunks
49
+ */
50
+ function splitByWords(text: string, maxLength: number): string[] {
51
+ const words = text.split(/(\s+)/);
52
+ const chunks: string[] = [];
53
+ let currentChunk = "";
54
+
55
+ for (const word of words) {
56
+ if (currentChunk.length + word.length <= maxLength) {
57
+ currentChunk += word;
58
+ } else {
59
+ if (currentChunk.trim()) {
60
+ chunks.push(currentChunk.trim());
61
+ }
62
+ // If a single word exceeds maxLength, split by characters
63
+ if (word.trim().length > maxLength) {
64
+ const charChunks = splitByCharacters(word.trim(), maxLength);
65
+ chunks.push(...charChunks);
66
+ currentChunk = "";
67
+ } else {
68
+ currentChunk = word;
69
+ }
70
+ }
71
+ }
72
+
73
+ if (currentChunk.trim()) {
74
+ chunks.push(currentChunk.trim());
75
+ }
76
+
77
+ return chunks;
78
+ }
79
+
80
+ /**
81
+ * Split text by characters, ensuring each chunk is under maxLength.
82
+ * Used for languages without spaces (Japanese, Chinese, etc.)
83
+ *
84
+ * @param text - Text to split
85
+ * @param maxLength - Maximum length of each chunk
86
+ * @returns Array of text chunks
87
+ */
88
+ function splitByCharacters(text: string, maxLength: number): string[] {
89
+ const chunks: string[] = [];
90
+
91
+ for (let i = 0; i < text.length; i += maxLength) {
92
+ chunks.push(text.slice(i, i + maxLength));
93
+ }
94
+
95
+ return chunks;
96
+ }
97
+
98
+ /**
99
+ * Split a single chunk that exceeds maxLength into smaller chunks.
100
+ * Uses word-based splitting for texts with spaces, character-based for texts without.
101
+ *
102
+ * @param chunk - Text chunk to split
103
+ * @param maxLength - Maximum length of each chunk
104
+ * @returns Array of text chunks, all under maxLength
105
+ */
106
+ function splitOversizedChunk(chunk: string, maxLength: number): string[] {
107
+ if (chunk.length <= maxLength) {
108
+ return [chunk];
109
+ }
110
+
111
+ // Check if text has spaces (word-based splitting possible)
112
+ if (hasSpaces(chunk)) {
113
+ return splitByWords(chunk, maxLength);
114
+ }
115
+
116
+ // No spaces: use character-based splitting (Japanese, Chinese, etc.)
117
+ return splitByCharacters(chunk, maxLength);
118
+ }
119
+
10
120
  /**
11
121
  * Split input text into sentence chunks suitable for TTS processing.
12
122
  *
@@ -15,9 +125,16 @@ import { DEFAULT_MAX_TEXT_LENGTH } from "./constants.js";
15
125
  * It handles various punctuation patterns and provides graceful fallback to
16
126
  * word/character boundaries when necessary.
17
127
  *
128
+ * Chunking Strategy:
129
+ * 1. First, split by sentence boundaries (multilingual punctuation)
130
+ * 2. Merge sentences into chunks up to maxLength
131
+ * 3. If a sentence exceeds maxLength:
132
+ * - For text with spaces: split by words
133
+ * - For text without spaces (Japanese, etc.): split by characters
134
+ *
18
135
  * @param text - Input text to be segmented
19
136
  * @param maxLength - Maximum length of each chunk
20
- * @returns Array of text chunks
137
+ * @returns Array of text chunks, each guaranteed to be <= maxLength
21
138
  */
22
139
  export function chunkText(
23
140
  text: string,
@@ -27,28 +144,42 @@ export function chunkText(
27
144
  return [text];
28
145
  }
29
146
 
30
- // Split by sentence boundaries
31
- const sentences = text.split(/([.!?;:]+\s*)/);
147
+ // Step 1: Split by sentence boundaries (multilingual punctuation)
148
+ const sentences = text.split(SENTENCE_SPLIT_PATTERN);
32
149
 
33
- const chunks: string[] = [];
150
+ const preliminaryChunks: string[] = [];
34
151
  let currentChunk = "";
35
152
 
153
+ // Step 2: Merge sentences into chunks up to maxLength
36
154
  for (const sentence of sentences) {
37
155
  if (currentChunk.length + sentence.length <= maxLength) {
38
156
  currentChunk += sentence;
39
157
  } else {
40
158
  if (currentChunk) {
41
- chunks.push(currentChunk);
159
+ preliminaryChunks.push(currentChunk);
42
160
  }
43
161
  currentChunk = sentence;
44
162
  }
45
163
  }
46
164
 
47
165
  if (currentChunk) {
48
- chunks.push(currentChunk);
166
+ preliminaryChunks.push(currentChunk);
49
167
  }
50
168
 
51
- return chunks;
169
+ // Step 3: Handle oversized chunks (split by words or characters)
170
+ const finalChunks: string[] = [];
171
+ for (const chunk of preliminaryChunks) {
172
+ if (chunk.length <= maxLength) {
173
+ finalChunks.push(chunk);
174
+ } else {
175
+ // Chunk exceeds maxLength, need to split further
176
+ const subChunks = splitOversizedChunk(chunk, maxLength);
177
+ finalChunks.push(...subChunks);
178
+ }
179
+ }
180
+
181
+ // Filter out empty chunks
182
+ return finalChunks.filter((chunk) => chunk.length > 0);
52
183
  }
53
184
 
54
185
  /**
@@ -22,8 +22,26 @@ export const APIConvertTextToSpeechUsingCharacterRequestLanguage = {
22
22
  En: "en",
23
23
  Ko: "ko",
24
24
  Ja: "ja",
25
+ Bg: "bg",
26
+ Cs: "cs",
27
+ Da: "da",
28
+ El: "el",
25
29
  Es: "es",
30
+ Et: "et",
31
+ Fi: "fi",
32
+ Hu: "hu",
33
+ It: "it",
34
+ Nl: "nl",
35
+ Pl: "pl",
26
36
  Pt: "pt",
37
+ Ro: "ro",
38
+ Ar: "ar",
39
+ De: "de",
40
+ Fr: "fr",
41
+ Hi: "hi",
42
+ Id: "id",
43
+ Ru: "ru",
44
+ Vi: "vi",
27
45
  } as const;
28
46
  /**
29
47
  * The language code of the text
@@ -32,6 +50,22 @@ export type APIConvertTextToSpeechUsingCharacterRequestLanguage = ClosedEnum<
32
50
  typeof APIConvertTextToSpeechUsingCharacterRequestLanguage
33
51
  >;
34
52
 
53
+ /**
54
+ * The model type to use for the text-to-speech conversion
55
+ */
56
+ export const APIConvertTextToSpeechUsingCharacterRequestModel = {
57
+ SonaSpeech1: "sona_speech_1",
58
+ SonaSpeech2: "sona_speech_2",
59
+ SonaSpeech2t: "sona_speech_2t",
60
+ SupertonicApi1: "supertonic_api_1",
61
+ } as const;
62
+ /**
63
+ * The model type to use for the text-to-speech conversion
64
+ */
65
+ export type APIConvertTextToSpeechUsingCharacterRequestModel = ClosedEnum<
66
+ typeof APIConvertTextToSpeechUsingCharacterRequestModel
67
+ >;
68
+
35
69
  /**
36
70
  * The desired output format of the audio file (wav, mp3). Default is wav.
37
71
  */
@@ -61,7 +95,7 @@ export type APIConvertTextToSpeechUsingCharacterRequest = {
61
95
  /**
62
96
  * The model type to use for the text-to-speech conversion
63
97
  */
64
- model?: string | undefined;
98
+ model?: APIConvertTextToSpeechUsingCharacterRequestModel | undefined;
65
99
  /**
66
100
  * The desired output format of the audio file (wav, mp3). Default is wav.
67
101
  */
@@ -98,6 +132,29 @@ export namespace APIConvertTextToSpeechUsingCharacterRequestLanguage$ {
98
132
  APIConvertTextToSpeechUsingCharacterRequestLanguage$outboundSchema;
99
133
  }
100
134
 
135
+ /** @internal */
136
+ export const APIConvertTextToSpeechUsingCharacterRequestModel$inboundSchema:
137
+ z.ZodNativeEnum<typeof APIConvertTextToSpeechUsingCharacterRequestModel> = z
138
+ .nativeEnum(APIConvertTextToSpeechUsingCharacterRequestModel);
139
+
140
+ /** @internal */
141
+ export const APIConvertTextToSpeechUsingCharacterRequestModel$outboundSchema:
142
+ z.ZodNativeEnum<typeof APIConvertTextToSpeechUsingCharacterRequestModel> =
143
+ APIConvertTextToSpeechUsingCharacterRequestModel$inboundSchema;
144
+
145
+ /**
146
+ * @internal
147
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
148
+ */
149
+ export namespace APIConvertTextToSpeechUsingCharacterRequestModel$ {
150
+ /** @deprecated use `APIConvertTextToSpeechUsingCharacterRequestModel$inboundSchema` instead. */
151
+ export const inboundSchema =
152
+ APIConvertTextToSpeechUsingCharacterRequestModel$inboundSchema;
153
+ /** @deprecated use `APIConvertTextToSpeechUsingCharacterRequestModel$outboundSchema` instead. */
154
+ export const outboundSchema =
155
+ APIConvertTextToSpeechUsingCharacterRequestModel$outboundSchema;
156
+ }
157
+
101
158
  /** @internal */
102
159
  export const APIConvertTextToSpeechUsingCharacterRequestOutputFormat$inboundSchema:
103
160
  z.ZodNativeEnum<
@@ -133,7 +190,8 @@ export const APIConvertTextToSpeechUsingCharacterRequest$inboundSchema:
133
190
  text: z.string(),
134
191
  language: APIConvertTextToSpeechUsingCharacterRequestLanguage$inboundSchema,
135
192
  style: z.string().optional(),
136
- model: z.string().default("sona_speech_1"),
193
+ model: APIConvertTextToSpeechUsingCharacterRequestModel$inboundSchema
194
+ .default("sona_speech_1"),
137
195
  output_format:
138
196
  APIConvertTextToSpeechUsingCharacterRequestOutputFormat$inboundSchema
139
197
  .default("wav"),
@@ -169,7 +227,8 @@ export const APIConvertTextToSpeechUsingCharacterRequest$outboundSchema:
169
227
  language:
170
228
  APIConvertTextToSpeechUsingCharacterRequestLanguage$outboundSchema,
171
229
  style: z.string().optional(),
172
- model: z.string().default("sona_speech_1"),
230
+ model: APIConvertTextToSpeechUsingCharacterRequestModel$outboundSchema
231
+ .default("sona_speech_1"),
173
232
  outputFormat:
174
233
  APIConvertTextToSpeechUsingCharacterRequestOutputFormat$outboundSchema
175
234
  .default("wav"),
@@ -22,8 +22,26 @@ export const PredictTTSDurationUsingCharacterRequestLanguage = {
22
22
  En: "en",
23
23
  Ko: "ko",
24
24
  Ja: "ja",
25
+ Bg: "bg",
26
+ Cs: "cs",
27
+ Da: "da",
28
+ El: "el",
25
29
  Es: "es",
30
+ Et: "et",
31
+ Fi: "fi",
32
+ Hu: "hu",
33
+ It: "it",
34
+ Nl: "nl",
35
+ Pl: "pl",
26
36
  Pt: "pt",
37
+ Ro: "ro",
38
+ Ar: "ar",
39
+ De: "de",
40
+ Fr: "fr",
41
+ Hi: "hi",
42
+ Id: "id",
43
+ Ru: "ru",
44
+ Vi: "vi",
27
45
  } as const;
28
46
  /**
29
47
  * Language code of the voice
@@ -32,6 +50,22 @@ export type PredictTTSDurationUsingCharacterRequestLanguage = ClosedEnum<
32
50
  typeof PredictTTSDurationUsingCharacterRequestLanguage
33
51
  >;
34
52
 
53
+ /**
54
+ * The model type to use for the text-to-speech conversion
55
+ */
56
+ export const PredictTTSDurationUsingCharacterRequestModel = {
57
+ SonaSpeech1: "sona_speech_1",
58
+ SonaSpeech2: "sona_speech_2",
59
+ SonaSpeech2t: "sona_speech_2t",
60
+ SupertonicApi1: "supertonic_api_1",
61
+ } as const;
62
+ /**
63
+ * The model type to use for the text-to-speech conversion
64
+ */
65
+ export type PredictTTSDurationUsingCharacterRequestModel = ClosedEnum<
66
+ typeof PredictTTSDurationUsingCharacterRequestModel
67
+ >;
68
+
35
69
  /**
36
70
  * The desired output format of the audio file (wav, mp3). Default is wav.
37
71
  */
@@ -62,7 +96,7 @@ export type PredictTTSDurationUsingCharacterRequest = {
62
96
  /**
63
97
  * The model type to use for the text-to-speech conversion
64
98
  */
65
- model?: string | undefined;
99
+ model?: PredictTTSDurationUsingCharacterRequestModel | undefined;
66
100
  /**
67
101
  * The desired output format of the audio file (wav, mp3). Default is wav.
68
102
  */
@@ -95,6 +129,29 @@ export namespace PredictTTSDurationUsingCharacterRequestLanguage$ {
95
129
  PredictTTSDurationUsingCharacterRequestLanguage$outboundSchema;
96
130
  }
97
131
 
132
+ /** @internal */
133
+ export const PredictTTSDurationUsingCharacterRequestModel$inboundSchema:
134
+ z.ZodNativeEnum<typeof PredictTTSDurationUsingCharacterRequestModel> = z
135
+ .nativeEnum(PredictTTSDurationUsingCharacterRequestModel);
136
+
137
+ /** @internal */
138
+ export const PredictTTSDurationUsingCharacterRequestModel$outboundSchema:
139
+ z.ZodNativeEnum<typeof PredictTTSDurationUsingCharacterRequestModel> =
140
+ PredictTTSDurationUsingCharacterRequestModel$inboundSchema;
141
+
142
+ /**
143
+ * @internal
144
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
145
+ */
146
+ export namespace PredictTTSDurationUsingCharacterRequestModel$ {
147
+ /** @deprecated use `PredictTTSDurationUsingCharacterRequestModel$inboundSchema` instead. */
148
+ export const inboundSchema =
149
+ PredictTTSDurationUsingCharacterRequestModel$inboundSchema;
150
+ /** @deprecated use `PredictTTSDurationUsingCharacterRequestModel$outboundSchema` instead. */
151
+ export const outboundSchema =
152
+ PredictTTSDurationUsingCharacterRequestModel$outboundSchema;
153
+ }
154
+
98
155
  /** @internal */
99
156
  export const PredictTTSDurationUsingCharacterRequestOutputFormat$inboundSchema:
100
157
  z.ZodNativeEnum<typeof PredictTTSDurationUsingCharacterRequestOutputFormat> =
@@ -127,7 +184,9 @@ export const PredictTTSDurationUsingCharacterRequest$inboundSchema: z.ZodType<
127
184
  text: z.string(),
128
185
  language: PredictTTSDurationUsingCharacterRequestLanguage$inboundSchema,
129
186
  style: z.string().optional(),
130
- model: z.string().default("sona_speech_1"),
187
+ model: PredictTTSDurationUsingCharacterRequestModel$inboundSchema.default(
188
+ "sona_speech_1",
189
+ ),
131
190
  output_format:
132
191
  PredictTTSDurationUsingCharacterRequestOutputFormat$inboundSchema.default(
133
192
  "wav",
@@ -159,7 +218,9 @@ export const PredictTTSDurationUsingCharacterRequest$outboundSchema: z.ZodType<
159
218
  text: z.string(),
160
219
  language: PredictTTSDurationUsingCharacterRequestLanguage$outboundSchema,
161
220
  style: z.string().optional(),
162
- model: z.string().default("sona_speech_1"),
221
+ model: PredictTTSDurationUsingCharacterRequestModel$outboundSchema.default(
222
+ "sona_speech_1",
223
+ ),
163
224
  outputFormat:
164
225
  PredictTTSDurationUsingCharacterRequestOutputFormat$outboundSchema.default(
165
226
  "wav",