@runapi.ai/fish-audio 0.1.0 → 0.1.1

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 CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Install `@runapi.ai/fish-audio`, create `FishAudioClient`, and call `client.textToSpeech.run({ model: 's1', text: 'Hello' })`.
4
4
 
5
+ Pass optional `references` entries with base64-encoded raw audio bytes and exact transcripts for request-scoped voice matching.
6
+
5
7
  Model details and pricing: https://runapi.ai/models/fish-audio
6
8
 
7
9
  Licensed under the Apache License, Version 2.0.
package/dist/index.d.mts CHANGED
@@ -1,12 +1,21 @@
1
1
  import { HttpClient, RequestOptions, BaseClient, ClientOptions } from '@runapi.ai/core';
2
2
  export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TimeoutError, ValidationError } from '@runapi.ai/core';
3
3
 
4
+ /** A request-scoped reference audio sample. */
5
+ interface ReferenceAudio {
6
+ /** Base64-encoded raw audio bytes. */
7
+ audio: string;
8
+ /** Exact transcript of the reference audio. */
9
+ text: string;
10
+ }
4
11
  /** Parameters for Fish Audio text-to-speech generation. */
5
12
  interface TextToSpeechParams {
6
13
  /** Model slug accepted by the Fish Audio catalog. */
7
14
  model: string;
8
15
  /** Text to synthesize. */
9
16
  text: string;
17
+ /** Optional request-scoped reference audio samples. */
18
+ references?: ReferenceAudio[];
10
19
  }
11
20
  /** A RunAPI-managed MP3 audio result. */
12
21
  interface Audio {
@@ -39,4 +48,4 @@ declare class FishAudioClient extends BaseClient {
39
48
  constructor(options?: ClientOptions);
40
49
  }
41
50
 
42
- export { type Audio, FishAudioClient, type TextToSpeechParams, type TextToSpeechResponse };
51
+ export { type Audio, FishAudioClient, type ReferenceAudio, type TextToSpeechParams, type TextToSpeechResponse };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,21 @@
1
1
  import { HttpClient, RequestOptions, BaseClient, ClientOptions } from '@runapi.ai/core';
2
2
  export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TimeoutError, ValidationError } from '@runapi.ai/core';
3
3
 
4
+ /** A request-scoped reference audio sample. */
5
+ interface ReferenceAudio {
6
+ /** Base64-encoded raw audio bytes. */
7
+ audio: string;
8
+ /** Exact transcript of the reference audio. */
9
+ text: string;
10
+ }
4
11
  /** Parameters for Fish Audio text-to-speech generation. */
5
12
  interface TextToSpeechParams {
6
13
  /** Model slug accepted by the Fish Audio catalog. */
7
14
  model: string;
8
15
  /** Text to synthesize. */
9
16
  text: string;
17
+ /** Optional request-scoped reference audio samples. */
18
+ references?: ReferenceAudio[];
10
19
  }
11
20
  /** A RunAPI-managed MP3 audio result. */
12
21
  interface Audio {
@@ -39,4 +48,4 @@ declare class FishAudioClient extends BaseClient {
39
48
  constructor(options?: ClientOptions);
40
49
  }
41
50
 
42
- export { type Audio, FishAudioClient, type TextToSpeechParams, type TextToSpeechResponse };
51
+ export { type Audio, FishAudioClient, type ReferenceAudio, type TextToSpeechParams, type TextToSpeechResponse };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "runapi": {
4
4
  "slug": "fish-audio"
5
5
  },
6
- "version": "0.1.0",
6
+ "version": "0.1.1",
7
7
  "description": "RunAPI Fish Audio SDK for speech generation in JavaScript, Python, Ruby, Go, Java, and PHP",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  "clean": "rm -rf dist"
31
31
  },
32
32
  "dependencies": {
33
- "@runapi.ai/core": "^0.2.13"
33
+ "@runapi.ai/core": "^0.2.14"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^20.0.0",