@supertone/supertone 0.1.1 → 0.1.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/README.md +123 -73
- package/custom_test/realtime_tts_player.ts +64 -3
- package/custom_test/test_real_api.ts +1040 -105
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/custom_utils/text_utils.d.ts +8 -1
- package/dist/commonjs/lib/custom_utils/text_utils.d.ts.map +1 -1
- package/dist/commonjs/lib/custom_utils/text_utils.js +108 -7
- package/dist/commonjs/lib/custom_utils/text_utils.js.map +1 -1
- package/dist/commonjs/models/apiconverttexttospeechusingcharacterrequest.d.ts +92 -1
- package/dist/commonjs/models/apiconverttexttospeechusingcharacterrequest.d.ts.map +1 -1
- package/dist/commonjs/models/apiconverttexttospeechusingcharacterrequest.js +48 -3
- package/dist/commonjs/models/apiconverttexttospeechusingcharacterrequest.js.map +1 -1
- package/dist/commonjs/models/predictttsdurationusingcharacterrequest.d.ts +92 -1
- package/dist/commonjs/models/predictttsdurationusingcharacterrequest.d.ts.map +1 -1
- package/dist/commonjs/models/predictttsdurationusingcharacterrequest.js +46 -3
- package/dist/commonjs/models/predictttsdurationusingcharacterrequest.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/custom_utils/text_utils.d.ts +8 -1
- package/dist/esm/lib/custom_utils/text_utils.d.ts.map +1 -1
- package/dist/esm/lib/custom_utils/text_utils.js +108 -7
- package/dist/esm/lib/custom_utils/text_utils.js.map +1 -1
- package/dist/esm/models/apiconverttexttospeechusingcharacterrequest.d.ts +92 -1
- package/dist/esm/models/apiconverttexttospeechusingcharacterrequest.d.ts.map +1 -1
- package/dist/esm/models/apiconverttexttospeechusingcharacterrequest.js +47 -2
- package/dist/esm/models/apiconverttexttospeechusingcharacterrequest.js.map +1 -1
- package/dist/esm/models/predictttsdurationusingcharacterrequest.d.ts +92 -1
- package/dist/esm/models/predictttsdurationusingcharacterrequest.d.ts.map +1 -1
- package/dist/esm/models/predictttsdurationusingcharacterrequest.js +45 -2
- package/dist/esm/models/predictttsdurationusingcharacterrequest.js.map +1 -1
- package/examples/custom_voices/create_cloned_voice.ts +4 -3
- package/examples/custom_voices/delete_custom_voice.ts +2 -7
- package/examples/custom_voices/edit_custom_voice.ts +2 -6
- package/examples/custom_voices/get_custom_voice.ts +2 -7
- package/examples/custom_voices/list_custom_voices.ts +2 -7
- package/examples/custom_voices/search_custom_voices.ts +2 -6
- package/examples/text_to_speech/create_speech.ts +3 -8
- package/examples/text_to_speech/create_speech_long_text.ts +3 -7
- package/examples/text_to_speech/create_speech_with_phonemes.ts +3 -7
- package/examples/text_to_speech/create_speech_with_voice_settings.ts +3 -8
- package/examples/text_to_speech/predict_duration.ts +3 -7
- package/examples/text_to_speech/stream_speech.ts +3 -7
- package/examples/text_to_speech/stream_speech_long_text.ts +3 -7
- package/examples/text_to_speech/stream_speech_with_phonemes.ts +3 -7
- package/examples/text_to_speech/stream_speech_with_voice_settings.ts +3 -7
- package/examples/usage/get_credit_balance.ts +2 -6
- package/examples/usage/get_usage.ts +2 -6
- package/examples/usage/get_voice_usage.ts +2 -7
- package/examples/voices/get_voice.ts +2 -6
- package/examples/voices/list_voices.ts +2 -6
- package/examples/voices/search_voices.ts +2 -7
- package/jsr.json +1 -1
- package/openapi.json +101 -9
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/lib/custom_utils/text_utils.ts +117 -7
- package/src/models/apiconverttexttospeechusingcharacterrequest.ts +62 -3
- package/src/models/predictttsdurationusingcharacterrequest.ts +64 -3
|
@@ -10,13 +10,44 @@ export declare const PredictTTSDurationUsingCharacterRequestLanguage: {
|
|
|
10
10
|
readonly En: "en";
|
|
11
11
|
readonly Ko: "ko";
|
|
12
12
|
readonly Ja: "ja";
|
|
13
|
+
readonly Bg: "bg";
|
|
14
|
+
readonly Cs: "cs";
|
|
15
|
+
readonly Da: "da";
|
|
16
|
+
readonly El: "el";
|
|
13
17
|
readonly Es: "es";
|
|
18
|
+
readonly Et: "et";
|
|
19
|
+
readonly Fi: "fi";
|
|
20
|
+
readonly Hu: "hu";
|
|
21
|
+
readonly It: "it";
|
|
22
|
+
readonly Nl: "nl";
|
|
23
|
+
readonly Pl: "pl";
|
|
14
24
|
readonly Pt: "pt";
|
|
25
|
+
readonly Ro: "ro";
|
|
26
|
+
readonly Ar: "ar";
|
|
27
|
+
readonly De: "de";
|
|
28
|
+
readonly Fr: "fr";
|
|
29
|
+
readonly Hi: "hi";
|
|
30
|
+
readonly Id: "id";
|
|
31
|
+
readonly Ru: "ru";
|
|
32
|
+
readonly Vi: "vi";
|
|
15
33
|
};
|
|
16
34
|
/**
|
|
17
35
|
* Language code of the voice
|
|
18
36
|
*/
|
|
19
37
|
export type PredictTTSDurationUsingCharacterRequestLanguage = ClosedEnum<typeof PredictTTSDurationUsingCharacterRequestLanguage>;
|
|
38
|
+
/**
|
|
39
|
+
* The model type to use for the text-to-speech conversion
|
|
40
|
+
*/
|
|
41
|
+
export declare const PredictTTSDurationUsingCharacterRequestModel: {
|
|
42
|
+
readonly SonaSpeech1: "sona_speech_1";
|
|
43
|
+
readonly SonaSpeech2: "sona_speech_2";
|
|
44
|
+
readonly SonaSpeech2t: "sona_speech_2t";
|
|
45
|
+
readonly SupertonicApi1: "supertonic_api_1";
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The model type to use for the text-to-speech conversion
|
|
49
|
+
*/
|
|
50
|
+
export type PredictTTSDurationUsingCharacterRequestModel = ClosedEnum<typeof PredictTTSDurationUsingCharacterRequestModel>;
|
|
20
51
|
/**
|
|
21
52
|
* The desired output format of the audio file (wav, mp3). Default is wav.
|
|
22
53
|
*/
|
|
@@ -44,7 +75,7 @@ export type PredictTTSDurationUsingCharacterRequest = {
|
|
|
44
75
|
/**
|
|
45
76
|
* The model type to use for the text-to-speech conversion
|
|
46
77
|
*/
|
|
47
|
-
model?:
|
|
78
|
+
model?: PredictTTSDurationUsingCharacterRequestModel | undefined;
|
|
48
79
|
/**
|
|
49
80
|
* The desired output format of the audio file (wav, mp3). Default is wav.
|
|
50
81
|
*/
|
|
@@ -65,16 +96,76 @@ export declare namespace PredictTTSDurationUsingCharacterRequestLanguage$ {
|
|
|
65
96
|
readonly En: "en";
|
|
66
97
|
readonly Ko: "ko";
|
|
67
98
|
readonly Ja: "ja";
|
|
99
|
+
readonly Bg: "bg";
|
|
100
|
+
readonly Cs: "cs";
|
|
101
|
+
readonly Da: "da";
|
|
102
|
+
readonly El: "el";
|
|
68
103
|
readonly Es: "es";
|
|
104
|
+
readonly Et: "et";
|
|
105
|
+
readonly Fi: "fi";
|
|
106
|
+
readonly Hu: "hu";
|
|
107
|
+
readonly It: "it";
|
|
108
|
+
readonly Nl: "nl";
|
|
109
|
+
readonly Pl: "pl";
|
|
69
110
|
readonly Pt: "pt";
|
|
111
|
+
readonly Ro: "ro";
|
|
112
|
+
readonly Ar: "ar";
|
|
113
|
+
readonly De: "de";
|
|
114
|
+
readonly Fr: "fr";
|
|
115
|
+
readonly Hi: "hi";
|
|
116
|
+
readonly Id: "id";
|
|
117
|
+
readonly Ru: "ru";
|
|
118
|
+
readonly Vi: "vi";
|
|
70
119
|
}>;
|
|
71
120
|
/** @deprecated use `PredictTTSDurationUsingCharacterRequestLanguage$outboundSchema` instead. */
|
|
72
121
|
const outboundSchema: z.ZodNativeEnum<{
|
|
73
122
|
readonly En: "en";
|
|
74
123
|
readonly Ko: "ko";
|
|
75
124
|
readonly Ja: "ja";
|
|
125
|
+
readonly Bg: "bg";
|
|
126
|
+
readonly Cs: "cs";
|
|
127
|
+
readonly Da: "da";
|
|
128
|
+
readonly El: "el";
|
|
76
129
|
readonly Es: "es";
|
|
130
|
+
readonly Et: "et";
|
|
131
|
+
readonly Fi: "fi";
|
|
132
|
+
readonly Hu: "hu";
|
|
133
|
+
readonly It: "it";
|
|
134
|
+
readonly Nl: "nl";
|
|
135
|
+
readonly Pl: "pl";
|
|
77
136
|
readonly Pt: "pt";
|
|
137
|
+
readonly Ro: "ro";
|
|
138
|
+
readonly Ar: "ar";
|
|
139
|
+
readonly De: "de";
|
|
140
|
+
readonly Fr: "fr";
|
|
141
|
+
readonly Hi: "hi";
|
|
142
|
+
readonly Id: "id";
|
|
143
|
+
readonly Ru: "ru";
|
|
144
|
+
readonly Vi: "vi";
|
|
145
|
+
}>;
|
|
146
|
+
}
|
|
147
|
+
/** @internal */
|
|
148
|
+
export declare const PredictTTSDurationUsingCharacterRequestModel$inboundSchema: z.ZodNativeEnum<typeof PredictTTSDurationUsingCharacterRequestModel>;
|
|
149
|
+
/** @internal */
|
|
150
|
+
export declare const PredictTTSDurationUsingCharacterRequestModel$outboundSchema: z.ZodNativeEnum<typeof PredictTTSDurationUsingCharacterRequestModel>;
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
154
|
+
*/
|
|
155
|
+
export declare namespace PredictTTSDurationUsingCharacterRequestModel$ {
|
|
156
|
+
/** @deprecated use `PredictTTSDurationUsingCharacterRequestModel$inboundSchema` instead. */
|
|
157
|
+
const inboundSchema: z.ZodNativeEnum<{
|
|
158
|
+
readonly SonaSpeech1: "sona_speech_1";
|
|
159
|
+
readonly SonaSpeech2: "sona_speech_2";
|
|
160
|
+
readonly SonaSpeech2t: "sona_speech_2t";
|
|
161
|
+
readonly SupertonicApi1: "supertonic_api_1";
|
|
162
|
+
}>;
|
|
163
|
+
/** @deprecated use `PredictTTSDurationUsingCharacterRequestModel$outboundSchema` instead. */
|
|
164
|
+
const outboundSchema: z.ZodNativeEnum<{
|
|
165
|
+
readonly SonaSpeech1: "sona_speech_1";
|
|
166
|
+
readonly SonaSpeech2: "sona_speech_2";
|
|
167
|
+
readonly SonaSpeech2t: "sona_speech_2t";
|
|
168
|
+
readonly SupertonicApi1: "supertonic_api_1";
|
|
78
169
|
}>;
|
|
79
170
|
}
|
|
80
171
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictttsdurationusingcharacterrequest.d.ts","sourceRoot":"","sources":["../../../src/models/predictttsdurationusingcharacterrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,6BAA6B,EAE7B,sCAAsC,EAEvC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,+CAA+C
|
|
1
|
+
{"version":3,"file":"predictttsdurationusingcharacterrequest.d.ts","sourceRoot":"","sources":["../../../src/models/predictttsdurationusingcharacterrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EACL,6BAA6B,EAE7B,sCAAsC,EAEvC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;CAwBlD,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,+CAA+C,GAAG,UAAU,CACtE,OAAO,+CAA+C,CACvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4CAA4C;;;;;CAK/C,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,4CAA4C,GAAG,UAAU,CACnE,OAAO,4CAA4C,CACpD,CAAC;AAEF;;GAEG;AACH,eAAO,MA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@@ -12,8 +12,35 @@ export const PredictTTSDurationUsingCharacterRequestLanguage = {
|
|
|
12
12
|
En: "en",
|
|
13
13
|
Ko: "ko",
|
|
14
14
|
Ja: "ja",
|
|
15
|
+
Bg: "bg",
|
|
16
|
+
Cs: "cs",
|
|
17
|
+
Da: "da",
|
|
18
|
+
El: "el",
|
|
15
19
|
Es: "es",
|
|
20
|
+
Et: "et",
|
|
21
|
+
Fi: "fi",
|
|
22
|
+
Hu: "hu",
|
|
23
|
+
It: "it",
|
|
24
|
+
Nl: "nl",
|
|
25
|
+
Pl: "pl",
|
|
16
26
|
Pt: "pt",
|
|
27
|
+
Ro: "ro",
|
|
28
|
+
Ar: "ar",
|
|
29
|
+
De: "de",
|
|
30
|
+
Fr: "fr",
|
|
31
|
+
Hi: "hi",
|
|
32
|
+
Id: "id",
|
|
33
|
+
Ru: "ru",
|
|
34
|
+
Vi: "vi",
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The model type to use for the text-to-speech conversion
|
|
38
|
+
*/
|
|
39
|
+
export const PredictTTSDurationUsingCharacterRequestModel = {
|
|
40
|
+
SonaSpeech1: "sona_speech_1",
|
|
41
|
+
SonaSpeech2: "sona_speech_2",
|
|
42
|
+
SonaSpeech2t: "sona_speech_2t",
|
|
43
|
+
SupertonicApi1: "supertonic_api_1",
|
|
17
44
|
};
|
|
18
45
|
/**
|
|
19
46
|
* The desired output format of the audio file (wav, mp3). Default is wav.
|
|
@@ -39,6 +66,22 @@ export var PredictTTSDurationUsingCharacterRequestLanguage$;
|
|
|
39
66
|
PredictTTSDurationUsingCharacterRequestLanguage$.outboundSchema = PredictTTSDurationUsingCharacterRequestLanguage$outboundSchema;
|
|
40
67
|
})(PredictTTSDurationUsingCharacterRequestLanguage$ || (PredictTTSDurationUsingCharacterRequestLanguage$ = {}));
|
|
41
68
|
/** @internal */
|
|
69
|
+
export const PredictTTSDurationUsingCharacterRequestModel$inboundSchema = z
|
|
70
|
+
.nativeEnum(PredictTTSDurationUsingCharacterRequestModel);
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const PredictTTSDurationUsingCharacterRequestModel$outboundSchema = PredictTTSDurationUsingCharacterRequestModel$inboundSchema;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
+
*/
|
|
77
|
+
export var PredictTTSDurationUsingCharacterRequestModel$;
|
|
78
|
+
(function (PredictTTSDurationUsingCharacterRequestModel$) {
|
|
79
|
+
/** @deprecated use `PredictTTSDurationUsingCharacterRequestModel$inboundSchema` instead. */
|
|
80
|
+
PredictTTSDurationUsingCharacterRequestModel$.inboundSchema = PredictTTSDurationUsingCharacterRequestModel$inboundSchema;
|
|
81
|
+
/** @deprecated use `PredictTTSDurationUsingCharacterRequestModel$outboundSchema` instead. */
|
|
82
|
+
PredictTTSDurationUsingCharacterRequestModel$.outboundSchema = PredictTTSDurationUsingCharacterRequestModel$outboundSchema;
|
|
83
|
+
})(PredictTTSDurationUsingCharacterRequestModel$ || (PredictTTSDurationUsingCharacterRequestModel$ = {}));
|
|
84
|
+
/** @internal */
|
|
42
85
|
export const PredictTTSDurationUsingCharacterRequestOutputFormat$inboundSchema = z.nativeEnum(PredictTTSDurationUsingCharacterRequestOutputFormat);
|
|
43
86
|
/** @internal */
|
|
44
87
|
export const PredictTTSDurationUsingCharacterRequestOutputFormat$outboundSchema = PredictTTSDurationUsingCharacterRequestOutputFormat$inboundSchema;
|
|
@@ -58,7 +101,7 @@ export const PredictTTSDurationUsingCharacterRequest$inboundSchema = z.object({
|
|
|
58
101
|
text: z.string(),
|
|
59
102
|
language: PredictTTSDurationUsingCharacterRequestLanguage$inboundSchema,
|
|
60
103
|
style: z.string().optional(),
|
|
61
|
-
model:
|
|
104
|
+
model: PredictTTSDurationUsingCharacterRequestModel$inboundSchema.default("sona_speech_1"),
|
|
62
105
|
output_format: PredictTTSDurationUsingCharacterRequestOutputFormat$inboundSchema.default("wav"),
|
|
63
106
|
voice_settings: ConvertTextToSpeechParameters$inboundSchema.optional(),
|
|
64
107
|
}).transform((v) => {
|
|
@@ -72,7 +115,7 @@ export const PredictTTSDurationUsingCharacterRequest$outboundSchema = z.object({
|
|
|
72
115
|
text: z.string(),
|
|
73
116
|
language: PredictTTSDurationUsingCharacterRequestLanguage$outboundSchema,
|
|
74
117
|
style: z.string().optional(),
|
|
75
|
-
model:
|
|
118
|
+
model: PredictTTSDurationUsingCharacterRequestModel$outboundSchema.default("sona_speech_1"),
|
|
76
119
|
outputFormat: PredictTTSDurationUsingCharacterRequestOutputFormat$outboundSchema.default("wav"),
|
|
77
120
|
voiceSettings: ConvertTextToSpeechParameters$outboundSchema.optional(),
|
|
78
121
|
}).transform((v) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictttsdurationusingcharacterrequest.js","sourceRoot":"","sources":["../../../src/models/predictttsdurationusingcharacterrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,2CAA2C,EAE3C,4CAA4C,GAC7C,MAAM,oCAAoC,CAAC;AAG5C;;GAEG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAAG;IAC7D,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACA,CAAC;AAQX;;GAEG;AACH,MAAM,CAAC,MAAM,mDAAmD,GAAG;IACjE,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;CACF,CAAC;AAkCX,gBAAgB;AAChB,MAAM,CAAC,MAAM,6DAA6D,GACE,CAAC;KACxE,UAAU,CAAC,+CAA+C,CAAC,CAAC;AAEjE,gBAAgB;AAChB,MAAM,CAAC,MAAM,8DAA8D,GAEvE,6DAA6D,CAAC;AAElE;;;GAGG;AACH,MAAM,KAAW,gDAAgD,CAOhE;AAPD,WAAiB,gDAAgD;IAC/D,+FAA+F;IAClF,8DAAa,GACxB,6DAA6D,CAAC;IAChE,gGAAgG;IACnF,+DAAc,GACzB,8DAA8D,CAAC;AACnE,CAAC,EAPgB,gDAAgD,KAAhD,gDAAgD,QAOhE;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,iEAAiE,GAE1E,CAAC,CAAC,UAAU,CAAC,mDAAmD,CAAC,CAAC;AAEtE,gBAAgB;AAChB,MAAM,CAAC,MAAM,kEAAkE,GAE3E,iEAAiE,CAAC;AAEtE;;;GAGG;AACH,MAAM,KAAW,oDAAoD,CAOpE;AAPD,WAAiB,oDAAoD;IACnE,mGAAmG;IACtF,kEAAa,GACxB,iEAAiE,CAAC;IACpE,oGAAoG;IACvF,mEAAc,GACzB,kEAAkE,CAAC;AACvE,CAAC,EAPgB,oDAAoD,KAApD,oDAAoD,QAOpE;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,qDAAqD,GAI9D,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,6DAA6D;IACvE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"predictttsdurationusingcharacterrequest.js","sourceRoot":"","sources":["../../../src/models/predictttsdurationusingcharacterrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAEL,2CAA2C,EAE3C,4CAA4C,GAC7C,MAAM,oCAA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6,16 +6,18 @@
|
|
|
6
6
|
* ⚠️ This consumes API credits and creates a permanent custom voice!
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Supertone } from "
|
|
9
|
+
import { Supertone } from "@supertone/supertone";
|
|
10
10
|
import * as fs from "fs";
|
|
11
11
|
import * as dotenv from "dotenv";
|
|
12
12
|
import * as path from "path";
|
|
13
13
|
import { fileURLToPath } from "url";
|
|
14
14
|
|
|
15
15
|
// Load environment variables
|
|
16
|
+
dotenv.config();
|
|
17
|
+
|
|
18
|
+
// For resolving relative file paths
|
|
16
19
|
const __filename = fileURLToPath(import.meta.url);
|
|
17
20
|
const __dirname = path.dirname(__filename);
|
|
18
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
19
21
|
|
|
20
22
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
21
23
|
|
|
@@ -113,4 +115,3 @@ async function main() {
|
|
|
113
115
|
}
|
|
114
116
|
|
|
115
117
|
main();
|
|
116
|
-
|
|
@@ -6,16 +6,12 @@
|
|
|
6
6
|
* ⚠️ This action cannot be undone!
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Supertone } from "
|
|
9
|
+
import { Supertone } from "@supertone/supertone";
|
|
10
10
|
import * as dotenv from "dotenv";
|
|
11
|
-
import * as path from "path";
|
|
12
|
-
import { fileURLToPath } from "url";
|
|
13
11
|
import * as readline from "readline";
|
|
14
12
|
|
|
15
13
|
// Load environment variables
|
|
16
|
-
|
|
17
|
-
const __dirname = path.dirname(__filename);
|
|
18
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
14
|
+
dotenv.config();
|
|
19
15
|
|
|
20
16
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
21
17
|
const CUSTOM_VOICE_ID =
|
|
@@ -95,4 +91,3 @@ async function main() {
|
|
|
95
91
|
}
|
|
96
92
|
|
|
97
93
|
main();
|
|
98
|
-
|
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
* This example demonstrates how to update a custom voice's name and description.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Supertone } from "
|
|
8
|
+
import { Supertone } from "@supertone/supertone";
|
|
9
9
|
import * as dotenv from "dotenv";
|
|
10
|
-
import * as path from "path";
|
|
11
|
-
import { fileURLToPath } from "url";
|
|
12
10
|
|
|
13
11
|
// Load environment variables
|
|
14
|
-
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
12
|
+
dotenv.config();
|
|
17
13
|
|
|
18
14
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
19
15
|
const CUSTOM_VOICE_ID =
|
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
* This example demonstrates how to retrieve detailed information about a custom voice.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Supertone } from "
|
|
8
|
+
import { Supertone } from "@supertone/supertone";
|
|
9
9
|
import * as dotenv from "dotenv";
|
|
10
|
-
import * as path from "path";
|
|
11
|
-
import { fileURLToPath } from "url";
|
|
12
10
|
|
|
13
11
|
// Load environment variables
|
|
14
|
-
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
12
|
+
dotenv.config();
|
|
17
13
|
|
|
18
14
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
19
15
|
const CUSTOM_VOICE_ID =
|
|
@@ -66,4 +62,3 @@ async function main() {
|
|
|
66
62
|
}
|
|
67
63
|
|
|
68
64
|
main();
|
|
69
|
-
|
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
* This example demonstrates how to list your custom cloned voices.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Supertone } from "
|
|
8
|
+
import { Supertone } from "@supertone/supertone";
|
|
9
9
|
import * as dotenv from "dotenv";
|
|
10
|
-
import * as path from "path";
|
|
11
|
-
import { fileURLToPath } from "url";
|
|
12
10
|
|
|
13
11
|
// Load environment variables
|
|
14
|
-
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
12
|
+
dotenv.config();
|
|
17
13
|
|
|
18
14
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
19
15
|
|
|
@@ -67,4 +63,3 @@ async function main() {
|
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
main();
|
|
70
|
-
|
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
* This example demonstrates how to search for custom voices by name.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Supertone } from "
|
|
8
|
+
import { Supertone } from "@supertone/supertone";
|
|
9
9
|
import * as dotenv from "dotenv";
|
|
10
|
-
import * as path from "path";
|
|
11
|
-
import { fileURLToPath } from "url";
|
|
12
10
|
|
|
13
11
|
// Load environment variables
|
|
14
|
-
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
12
|
+
dotenv.config();
|
|
17
13
|
|
|
18
14
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
19
15
|
|
|
@@ -6,17 +6,13 @@
|
|
|
6
6
|
* ⚠️ This consumes API credits!
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Supertone } from "
|
|
10
|
-
import * as models from "
|
|
9
|
+
import { Supertone } from "@supertone/supertone";
|
|
10
|
+
import * as models from "@supertone/supertone/models";
|
|
11
11
|
import * as fs from "fs";
|
|
12
12
|
import * as dotenv from "dotenv";
|
|
13
|
-
import * as path from "path";
|
|
14
|
-
import { fileURLToPath } from "url";
|
|
15
13
|
|
|
16
14
|
// Load environment variables
|
|
17
|
-
|
|
18
|
-
const __dirname = path.dirname(__filename);
|
|
19
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
15
|
+
dotenv.config();
|
|
20
16
|
|
|
21
17
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
22
18
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -94,4 +90,3 @@ async function main() {
|
|
|
94
90
|
}
|
|
95
91
|
|
|
96
92
|
main();
|
|
97
|
-
|
|
@@ -7,17 +7,13 @@
|
|
|
7
7
|
* ⚠️ This consumes API credits!
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Supertone } from "
|
|
11
|
-
import * as models from "
|
|
10
|
+
import { Supertone } from "@supertone/supertone";
|
|
11
|
+
import * as models from "@supertone/supertone/models";
|
|
12
12
|
import * as fs from "fs";
|
|
13
13
|
import * as dotenv from "dotenv";
|
|
14
|
-
import * as path from "path";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
14
|
|
|
17
15
|
// Load environment variables
|
|
18
|
-
|
|
19
|
-
const __dirname = path.dirname(__filename);
|
|
20
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
16
|
+
dotenv.config();
|
|
21
17
|
|
|
22
18
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
23
19
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -7,17 +7,13 @@
|
|
|
7
7
|
* ⚠️ This consumes API credits!
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Supertone } from "
|
|
11
|
-
import * as models from "
|
|
10
|
+
import { Supertone } from "@supertone/supertone";
|
|
11
|
+
import * as models from "@supertone/supertone/models";
|
|
12
12
|
import * as fs from "fs";
|
|
13
13
|
import * as dotenv from "dotenv";
|
|
14
|
-
import * as path from "path";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
14
|
|
|
17
15
|
// Load environment variables
|
|
18
|
-
|
|
19
|
-
const __dirname = path.dirname(__filename);
|
|
20
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
16
|
+
dotenv.config();
|
|
21
17
|
|
|
22
18
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
23
19
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -6,17 +6,13 @@
|
|
|
6
6
|
* ⚠️ This consumes API credits!
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Supertone } from "
|
|
10
|
-
import * as models from "
|
|
9
|
+
import { Supertone } from "@supertone/supertone";
|
|
10
|
+
import * as models from "@supertone/supertone/models";
|
|
11
11
|
import * as fs from "fs";
|
|
12
12
|
import * as dotenv from "dotenv";
|
|
13
|
-
import * as path from "path";
|
|
14
|
-
import { fileURLToPath } from "url";
|
|
15
13
|
|
|
16
14
|
// Load environment variables
|
|
17
|
-
|
|
18
|
-
const __dirname = path.dirname(__filename);
|
|
19
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
15
|
+
dotenv.config();
|
|
20
16
|
|
|
21
17
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
22
18
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -105,4 +101,3 @@ async function main() {
|
|
|
105
101
|
}
|
|
106
102
|
|
|
107
103
|
main();
|
|
108
|
-
|
|
@@ -6,16 +6,12 @@
|
|
|
6
6
|
* Useful for resource planning and UI pre-calculations.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Supertone } from "
|
|
10
|
-
import * as models from "
|
|
9
|
+
import { Supertone } from "@supertone/supertone";
|
|
10
|
+
import * as models from "@supertone/supertone/models";
|
|
11
11
|
import * as dotenv from "dotenv";
|
|
12
|
-
import * as path from "path";
|
|
13
|
-
import { fileURLToPath } from "url";
|
|
14
12
|
|
|
15
13
|
// Load environment variables
|
|
16
|
-
|
|
17
|
-
const __dirname = path.dirname(__filename);
|
|
18
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
14
|
+
dotenv.config();
|
|
19
15
|
|
|
20
16
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
21
17
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -7,17 +7,13 @@
|
|
|
7
7
|
* ⚠️ This consumes API credits!
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Supertone } from "
|
|
11
|
-
import * as models from "
|
|
10
|
+
import { Supertone } from "@supertone/supertone";
|
|
11
|
+
import * as models from "@supertone/supertone/models";
|
|
12
12
|
import * as fs from "fs";
|
|
13
13
|
import * as dotenv from "dotenv";
|
|
14
|
-
import * as path from "path";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
14
|
|
|
17
15
|
// Load environment variables
|
|
18
|
-
|
|
19
|
-
const __dirname = path.dirname(__filename);
|
|
20
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
16
|
+
dotenv.config();
|
|
21
17
|
|
|
22
18
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
23
19
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -7,17 +7,13 @@
|
|
|
7
7
|
* ⚠️ This consumes API credits!
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Supertone } from "
|
|
11
|
-
import * as models from "
|
|
10
|
+
import { Supertone } from "@supertone/supertone";
|
|
11
|
+
import * as models from "@supertone/supertone/models";
|
|
12
12
|
import * as fs from "fs";
|
|
13
13
|
import * as dotenv from "dotenv";
|
|
14
|
-
import * as path from "path";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
14
|
|
|
17
15
|
// Load environment variables
|
|
18
|
-
|
|
19
|
-
const __dirname = path.dirname(__filename);
|
|
20
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
16
|
+
dotenv.config();
|
|
21
17
|
|
|
22
18
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
23
19
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -7,17 +7,13 @@
|
|
|
7
7
|
* ⚠️ This consumes API credits!
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Supertone } from "
|
|
11
|
-
import * as models from "
|
|
10
|
+
import { Supertone } from "@supertone/supertone";
|
|
11
|
+
import * as models from "@supertone/supertone/models";
|
|
12
12
|
import * as fs from "fs";
|
|
13
13
|
import * as dotenv from "dotenv";
|
|
14
|
-
import * as path from "path";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
14
|
|
|
17
15
|
// Load environment variables
|
|
18
|
-
|
|
19
|
-
const __dirname = path.dirname(__filename);
|
|
20
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
16
|
+
dotenv.config();
|
|
21
17
|
|
|
22
18
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
23
19
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -7,17 +7,13 @@
|
|
|
7
7
|
* ⚠️ This consumes API credits!
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { Supertone } from "
|
|
11
|
-
import * as models from "
|
|
10
|
+
import { Supertone } from "@supertone/supertone";
|
|
11
|
+
import * as models from "@supertone/supertone/models";
|
|
12
12
|
import * as fs from "fs";
|
|
13
13
|
import * as dotenv from "dotenv";
|
|
14
|
-
import * as path from "path";
|
|
15
|
-
import { fileURLToPath } from "url";
|
|
16
14
|
|
|
17
15
|
// Load environment variables
|
|
18
|
-
|
|
19
|
-
const __dirname = path.dirname(__filename);
|
|
20
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
16
|
+
dotenv.config();
|
|
21
17
|
|
|
22
18
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
23
19
|
const VOICE_ID = process.env.VOICE_ID || "your-voice-id-here";
|
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
* This example demonstrates how to check your remaining credit balance.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Supertone } from "
|
|
8
|
+
import { Supertone } from "@supertone/supertone";
|
|
9
9
|
import * as dotenv from "dotenv";
|
|
10
|
-
import * as path from "path";
|
|
11
|
-
import { fileURLToPath } from "url";
|
|
12
10
|
|
|
13
11
|
// Load environment variables
|
|
14
|
-
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
12
|
+
dotenv.config();
|
|
17
13
|
|
|
18
14
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
19
15
|
|
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
* This example demonstrates how to retrieve usage analytics for a time period.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Supertone } from "
|
|
8
|
+
import { Supertone } from "@supertone/supertone";
|
|
9
9
|
import * as dotenv from "dotenv";
|
|
10
|
-
import * as path from "path";
|
|
11
|
-
import { fileURLToPath } from "url";
|
|
12
10
|
|
|
13
11
|
// Load environment variables
|
|
14
|
-
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
12
|
+
dotenv.config();
|
|
17
13
|
|
|
18
14
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
19
15
|
|
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
* This example demonstrates how to retrieve per-voice usage statistics.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Supertone } from "
|
|
8
|
+
import { Supertone } from "@supertone/supertone";
|
|
9
9
|
import * as dotenv from "dotenv";
|
|
10
|
-
import * as path from "path";
|
|
11
|
-
import { fileURLToPath } from "url";
|
|
12
10
|
|
|
13
11
|
// Load environment variables
|
|
14
|
-
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
dotenv.config({ path: path.join(__dirname, "../.env") });
|
|
12
|
+
dotenv.config();
|
|
17
13
|
|
|
18
14
|
const API_KEY = process.env.SUPERTONE_API_KEY;
|
|
19
15
|
|
|
@@ -72,4 +68,3 @@ async function main() {
|
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
main();
|
|
75
|
-
|