unspeech 0.1.14 → 0.1.16

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 (2) hide show
  1. package/dist/index.d.mts +47 -3
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -353,6 +353,50 @@ interface UnElevenLabsOptions {
353
353
  */
354
354
  declare function createUnElevenLabs(apiKey: string, baseURL?: string): SpeechProviderWithExtraOptions<"eleven_english_sts_v2" | "eleven_flash_v2" | "eleven_flash_v2_5" | "eleven_multilingual_sts_v2" | "eleven_multilingual_v2", UnElevenLabsOptions> & VoiceProviderWithExtraOptions<UnElevenLabsOptions>;
355
355
  //#endregion
356
+ //#region src/backend/stepfun.d.ts
357
+ interface UnStepfunOptions {
358
+ /**
359
+ * Audio volume. Range: 0.1 to 2.0.
360
+ *
361
+ * @default 1
362
+ */
363
+ volume?: number;
364
+ /**
365
+ * Voice labels for `step-tts-2` and `step-tts-mini`.
366
+ *
367
+ * Not supported by `stepaudio-2.5-tts`; use `instruction` instead.
368
+ */
369
+ voiceLabel?: {
370
+ language?: '粤语' | '四川话' | '日语' | string;
371
+ emotion?: string;
372
+ style?: string;
373
+ };
374
+ /**
375
+ * Global natural-language guidance for `stepaudio-2.5-tts`.
376
+ */
377
+ instruction?: string;
378
+ /**
379
+ * Output sample rate.
380
+ *
381
+ * @default 24000
382
+ */
383
+ sampleRate?: 8000 | 16000 | 22050 | 24000 | 48000 | number;
384
+ pronunciationMap?: {
385
+ tone: string[];
386
+ };
387
+ streamFormat?: 'audio' | 'sse';
388
+ markdownFilter?: boolean;
389
+ }
390
+ /**
391
+ * [StepFun / 阶跃星辰](https://platform.stepfun.com/) provider for
392
+ * [UnSpeech](https://github.com/moeru-ai/unspeech).
393
+ *
394
+ * @param apiKey - StepFun API key
395
+ * @param baseURL - UnSpeech Instance URL
396
+ * @returns SpeechProviderWithExtraOptions
397
+ */
398
+ declare function createUnStepfun(apiKey: string, baseURL?: string): SpeechProviderWithExtraOptions<`stepfun/${string}`, UnStepfunOptions> & VoiceProviderWithExtraOptions<UnStepfunOptions>;
399
+ //#endregion
356
400
  //#region src/backend/volcengine.d.ts
357
401
  interface UnVolcengineOptions {
358
402
  app?: {
@@ -456,7 +500,7 @@ declare function createUnVolcengine(apiKey: string, baseURL?: string): SpeechPro
456
500
  //#endregion
457
501
  //#region src/backend/index.d.ts
458
502
  /** @see {@link https://github.com/moeru-ai/unspeech} */
459
- declare function createUnSpeech(apiKey: string, baseURL?: string): _xsai_ext_providers_utils0.SpeechProviderWithExtraOptions<`alibaba/${string}` | `aliyun/${string}` | `deepgram/${string}` | `elevenlabs/${string}` | `koemotion/${string}` | `openai/${string}` | `volcano/${string}` | `volcengine/${string}`, UnSpeechOptions> & VoiceProviderWithExtraOptions<{
503
+ declare function createUnSpeech(apiKey: string, baseURL?: string): _xsai_ext_providers_utils0.SpeechProviderWithExtraOptions<`alibaba/${string}` | `aliyun/${string}` | `deepgram/${string}` | `elevenlabs/${string}` | `koemotion/${string}` | `openai/${string}` | `stepfun/${string}` | `volcano/${string}` | `volcengine/${string}`, UnSpeechOptions> & VoiceProviderWithExtraOptions<{
460
504
  appId: string;
461
505
  backend: "volcano";
462
506
  } | {
@@ -466,7 +510,7 @@ declare function createUnSpeech(apiKey: string, baseURL?: string): _xsai_ext_pro
466
510
  backend: "azure" | "microsoft";
467
511
  region: MicrosoftRegions | string;
468
512
  } | {
469
- backend: "ali" | "alibaba" | "alibaba-model-studio" | "aliyun" | "bailian" | "deepgram" | "elevenlabs" | "koemotion" | "openai";
513
+ backend: "ali" | "alibaba" | "alibaba-model-studio" | "aliyun" | "bailian" | "deepgram" | "elevenlabs" | "koemotion" | "openai" | "step" | "stepfun";
470
514
  }>;
471
515
  //#endregion
472
516
  //#region src/utils/generate-speech-response.d.ts
@@ -544,4 +588,4 @@ interface ListVoicesResponse {
544
588
  }
545
589
  declare function listVoices(options: ListVoicesOptions): Promise<Voice[]>;
546
590
  //#endregion
547
- export { DEFAULT_MICROSOFT_OUTPUT_FORMAT, GenerateSpeechResponseOptions, GenerateSpeechResponseResult, ListVoicesOptions, ListVoicesResponse, MicrosoftRegions, UnAlibabaCloudOptions, UnDeepgramOptions, UnElevenLabsOptions, UnMicrosoftOptionAutoSSML, UnMicrosoftOptionCommon, UnMicrosoftOptionCustomSSML, UnMicrosoftOptions, UnSpeechAPIError, UnSpeechAPIErrorOptions, UnSpeechOptions, UnVolcengineOptions, Voice, VoiceFormat, VoiceLanguage, VoiceProvider, VoiceProviderWithExtraOptions, buildMicrosoftSsml, createUnAlibabaCloud, createUnDeepgram, createUnElevenLabs, createUnMicrosoft, createUnSpeech, createUnVolcengine, escapeMicrosoftSsmlText, generateSpeechResponse, inferMicrosoftContentType, isMicrosoftVoiceId, listVoices, microsoftSpeedToProsodyRate, resolveMicrosoftOutputFormat };
591
+ export { DEFAULT_MICROSOFT_OUTPUT_FORMAT, GenerateSpeechResponseOptions, GenerateSpeechResponseResult, ListVoicesOptions, ListVoicesResponse, MicrosoftRegions, UnAlibabaCloudOptions, UnDeepgramOptions, UnElevenLabsOptions, UnMicrosoftOptionAutoSSML, UnMicrosoftOptionCommon, UnMicrosoftOptionCustomSSML, UnMicrosoftOptions, UnSpeechAPIError, UnSpeechAPIErrorOptions, UnSpeechOptions, UnStepfunOptions, UnVolcengineOptions, Voice, VoiceFormat, VoiceLanguage, VoiceProvider, VoiceProviderWithExtraOptions, buildMicrosoftSsml, createUnAlibabaCloud, createUnDeepgram, createUnElevenLabs, createUnMicrosoft, createUnSpeech, createUnStepfun, createUnVolcengine, escapeMicrosoftSsmlText, generateSpeechResponse, inferMicrosoftContentType, isMicrosoftVoiceId, listVoices, microsoftSpeedToProsodyRate, resolveMicrosoftOutputFormat };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unspeech",
3
3
  "type": "module",
4
- "version": "0.1.14",
4
+ "version": "0.1.16",
5
5
  "description": "Client SDK for unSpeech",
6
6
  "author": "Moeru AI",
7
7
  "license": "MIT",