@soniox/node 2.0.1 → 2.0.2
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.
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -682,7 +682,7 @@ type TtsAudioFormat = 'pcm_f32le' | 'pcm_s16le' | 'pcm_mulaw' | 'pcm_alaw' | 'wa
|
|
|
682
682
|
type TtsStreamInput = {
|
|
683
683
|
/**
|
|
684
684
|
* Text-to-Speech model to use.
|
|
685
|
-
* @example 'tts-rt-v1
|
|
685
|
+
* @example 'tts-rt-v1'
|
|
686
686
|
*/
|
|
687
687
|
model?: string | undefined;
|
|
688
688
|
/**
|
|
@@ -793,7 +793,7 @@ type TtsEvent = {
|
|
|
793
793
|
type GenerateSpeechOptions = {
|
|
794
794
|
/** Input text to generate as speech. */
|
|
795
795
|
text: string;
|
|
796
|
-
/** Text-to-Speech model to use. @default 'tts-rt-v1
|
|
796
|
+
/** Text-to-Speech model to use. @default 'tts-rt-v1' */
|
|
797
797
|
model?: string | undefined;
|
|
798
798
|
/** Language code. @default 'en' */
|
|
799
799
|
language?: string | undefined;
|
|
@@ -3589,7 +3589,7 @@ interface TtsFactory {
|
|
|
3589
3589
|
* @example
|
|
3590
3590
|
* ```typescript
|
|
3591
3591
|
* const stream = await client.realtime.tts({
|
|
3592
|
-
* model: 'tts-rt-v1
|
|
3592
|
+
* model: 'tts-rt-v1',
|
|
3593
3593
|
* voice: 'Adrian',
|
|
3594
3594
|
* language: 'en',
|
|
3595
3595
|
* audio_format: 'wav',
|
|
@@ -3608,14 +3608,14 @@ interface TtsFactory {
|
|
|
3608
3608
|
* ```typescript
|
|
3609
3609
|
* const conn = await client.realtime.tts.multiStream();
|
|
3610
3610
|
* const s1 = await conn.stream({
|
|
3611
|
-
* model: 'tts-rt-v1
|
|
3611
|
+
* model: 'tts-rt-v1',
|
|
3612
3612
|
* voice: 'Adrian',
|
|
3613
3613
|
* language: 'en',
|
|
3614
3614
|
* audio_format: 'wav',
|
|
3615
3615
|
* });
|
|
3616
3616
|
* // Use any voice returned by client.tts.listModels()
|
|
3617
3617
|
* const s2 = await conn.stream({
|
|
3618
|
-
* model: 'tts-rt-v1
|
|
3618
|
+
* model: 'tts-rt-v1',
|
|
3619
3619
|
* voice: someOtherVoice,
|
|
3620
3620
|
* language: 'en',
|
|
3621
3621
|
* audio_format: 'wav',
|
|
@@ -3636,7 +3636,7 @@ interface TtsFactory {
|
|
|
3636
3636
|
* @example TTS (single stream)
|
|
3637
3637
|
* ```typescript
|
|
3638
3638
|
* const stream = await client.realtime.tts({
|
|
3639
|
-
* model: 'tts-rt-v1
|
|
3639
|
+
* model: 'tts-rt-v1',
|
|
3640
3640
|
* voice: 'Adrian',
|
|
3641
3641
|
* language: 'en',
|
|
3642
3642
|
* audio_format: 'wav',
|
|
@@ -3650,7 +3650,7 @@ interface TtsFactory {
|
|
|
3650
3650
|
* ```typescript
|
|
3651
3651
|
* const conn = await client.realtime.tts.multiStream();
|
|
3652
3652
|
* const stream = await conn.stream({
|
|
3653
|
-
* model: 'tts-rt-v1
|
|
3653
|
+
* model: 'tts-rt-v1',
|
|
3654
3654
|
* voice: 'Adrian',
|
|
3655
3655
|
* language: 'en',
|
|
3656
3656
|
* audio_format: 'wav',
|
|
@@ -3695,7 +3695,7 @@ declare class SonioxRealtimeApi {
|
|
|
3695
3695
|
*
|
|
3696
3696
|
* // WebSocket TTS
|
|
3697
3697
|
* const stream = await client.realtime.tts({
|
|
3698
|
-
* model: 'tts-rt-v1
|
|
3698
|
+
* model: 'tts-rt-v1',
|
|
3699
3699
|
* voice: 'Adrian',
|
|
3700
3700
|
* language: 'en',
|
|
3701
3701
|
* audio_format: 'wav',
|
package/dist/index.d.mts
CHANGED
|
@@ -682,7 +682,7 @@ type TtsAudioFormat = 'pcm_f32le' | 'pcm_s16le' | 'pcm_mulaw' | 'pcm_alaw' | 'wa
|
|
|
682
682
|
type TtsStreamInput = {
|
|
683
683
|
/**
|
|
684
684
|
* Text-to-Speech model to use.
|
|
685
|
-
* @example 'tts-rt-v1
|
|
685
|
+
* @example 'tts-rt-v1'
|
|
686
686
|
*/
|
|
687
687
|
model?: string | undefined;
|
|
688
688
|
/**
|
|
@@ -793,7 +793,7 @@ type TtsEvent = {
|
|
|
793
793
|
type GenerateSpeechOptions = {
|
|
794
794
|
/** Input text to generate as speech. */
|
|
795
795
|
text: string;
|
|
796
|
-
/** Text-to-Speech model to use. @default 'tts-rt-v1
|
|
796
|
+
/** Text-to-Speech model to use. @default 'tts-rt-v1' */
|
|
797
797
|
model?: string | undefined;
|
|
798
798
|
/** Language code. @default 'en' */
|
|
799
799
|
language?: string | undefined;
|
|
@@ -3589,7 +3589,7 @@ interface TtsFactory {
|
|
|
3589
3589
|
* @example
|
|
3590
3590
|
* ```typescript
|
|
3591
3591
|
* const stream = await client.realtime.tts({
|
|
3592
|
-
* model: 'tts-rt-v1
|
|
3592
|
+
* model: 'tts-rt-v1',
|
|
3593
3593
|
* voice: 'Adrian',
|
|
3594
3594
|
* language: 'en',
|
|
3595
3595
|
* audio_format: 'wav',
|
|
@@ -3608,14 +3608,14 @@ interface TtsFactory {
|
|
|
3608
3608
|
* ```typescript
|
|
3609
3609
|
* const conn = await client.realtime.tts.multiStream();
|
|
3610
3610
|
* const s1 = await conn.stream({
|
|
3611
|
-
* model: 'tts-rt-v1
|
|
3611
|
+
* model: 'tts-rt-v1',
|
|
3612
3612
|
* voice: 'Adrian',
|
|
3613
3613
|
* language: 'en',
|
|
3614
3614
|
* audio_format: 'wav',
|
|
3615
3615
|
* });
|
|
3616
3616
|
* // Use any voice returned by client.tts.listModels()
|
|
3617
3617
|
* const s2 = await conn.stream({
|
|
3618
|
-
* model: 'tts-rt-v1
|
|
3618
|
+
* model: 'tts-rt-v1',
|
|
3619
3619
|
* voice: someOtherVoice,
|
|
3620
3620
|
* language: 'en',
|
|
3621
3621
|
* audio_format: 'wav',
|
|
@@ -3636,7 +3636,7 @@ interface TtsFactory {
|
|
|
3636
3636
|
* @example TTS (single stream)
|
|
3637
3637
|
* ```typescript
|
|
3638
3638
|
* const stream = await client.realtime.tts({
|
|
3639
|
-
* model: 'tts-rt-v1
|
|
3639
|
+
* model: 'tts-rt-v1',
|
|
3640
3640
|
* voice: 'Adrian',
|
|
3641
3641
|
* language: 'en',
|
|
3642
3642
|
* audio_format: 'wav',
|
|
@@ -3650,7 +3650,7 @@ interface TtsFactory {
|
|
|
3650
3650
|
* ```typescript
|
|
3651
3651
|
* const conn = await client.realtime.tts.multiStream();
|
|
3652
3652
|
* const stream = await conn.stream({
|
|
3653
|
-
* model: 'tts-rt-v1
|
|
3653
|
+
* model: 'tts-rt-v1',
|
|
3654
3654
|
* voice: 'Adrian',
|
|
3655
3655
|
* language: 'en',
|
|
3656
3656
|
* audio_format: 'wav',
|
|
@@ -3695,7 +3695,7 @@ declare class SonioxRealtimeApi {
|
|
|
3695
3695
|
*
|
|
3696
3696
|
* // WebSocket TTS
|
|
3697
3697
|
* const stream = await client.realtime.tts({
|
|
3698
|
-
* model: 'tts-rt-v1
|
|
3698
|
+
* model: 'tts-rt-v1',
|
|
3699
3699
|
* voice: 'Adrian',
|
|
3700
3700
|
* language: 'en',
|
|
3701
3701
|
* audio_format: 'wav',
|
package/dist/index.mjs
CHANGED
|
@@ -1731,7 +1731,7 @@ function getCommonValue(values) {
|
|
|
1731
1731
|
* Uses only `globalThis.fetch` — no Node-specific dependencies.
|
|
1732
1732
|
* Shared by both `@soniox/node` and `@soniox/client`.
|
|
1733
1733
|
*/
|
|
1734
|
-
const DEFAULT_MODEL = "tts-rt-v1
|
|
1734
|
+
const DEFAULT_MODEL = "tts-rt-v1";
|
|
1735
1735
|
const DEFAULT_LANGUAGE = "en";
|
|
1736
1736
|
const DEFAULT_AUDIO_FORMAT = "wav";
|
|
1737
1737
|
function buildPayload(options) {
|
|
@@ -4274,7 +4274,7 @@ function combineAbortSignals(...signals) {
|
|
|
4274
4274
|
* @example TTS (single stream)
|
|
4275
4275
|
* ```typescript
|
|
4276
4276
|
* const stream = await client.realtime.tts({
|
|
4277
|
-
* model: 'tts-rt-v1
|
|
4277
|
+
* model: 'tts-rt-v1',
|
|
4278
4278
|
* voice: 'Adrian',
|
|
4279
4279
|
* language: 'en',
|
|
4280
4280
|
* audio_format: 'wav',
|
|
@@ -4288,7 +4288,7 @@ function combineAbortSignals(...signals) {
|
|
|
4288
4288
|
* ```typescript
|
|
4289
4289
|
* const conn = await client.realtime.tts.multiStream();
|
|
4290
4290
|
* const stream = await conn.stream({
|
|
4291
|
-
* model: 'tts-rt-v1
|
|
4291
|
+
* model: 'tts-rt-v1',
|
|
4292
4292
|
* voice: 'Adrian',
|
|
4293
4293
|
* language: 'en',
|
|
4294
4294
|
* audio_format: 'wav',
|
|
@@ -4359,7 +4359,7 @@ var SonioxRealtimeApi = class {
|
|
|
4359
4359
|
*
|
|
4360
4360
|
* // WebSocket TTS
|
|
4361
4361
|
* const stream = await client.realtime.tts({
|
|
4362
|
-
* model: 'tts-rt-v1
|
|
4362
|
+
* model: 'tts-rt-v1',
|
|
4363
4363
|
* voice: 'Adrian',
|
|
4364
4364
|
* language: 'en',
|
|
4365
4365
|
* audio_format: 'wav',
|