@runapi.ai/fish-audio
Advanced tools
+6
-0
@@ -51,2 +51,5 @@ "use strict"; | ||
| "s1": { | ||
| "model": { | ||
| "required": true | ||
| }, | ||
| "text": { | ||
@@ -57,2 +60,5 @@ "required": true | ||
| "s2-pro": { | ||
| "model": { | ||
| "required": true | ||
| }, | ||
| "text": { | ||
@@ -59,0 +65,0 @@ "required": true |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/text-to-speech.ts","../src/contract_gen.ts"],"sourcesContent":["export { FishAudioClient } from './client';\nexport * from './types';\n\nexport {\n AuthenticationError,\n InsufficientCreditsError,\n NetworkError,\n NotFoundError,\n RateLimitError,\n RunApiError,\n ServiceUnavailableError,\n TimeoutError,\n ValidationError,\n} from '@runapi.ai/core';\n","import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToSpeech } from './resources/text-to-speech';\n\n/** Fish Audio speech generation client. */\nexport class FishAudioClient extends BaseClient {\n /** Generate speech from text. */\n public readonly textToSpeech: TextToSpeech;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.textToSpeech = new TextToSpeech(this.http);\n }\n}\n","import type { ActionSchema, HttpClient, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { TextToSpeechParams, TextToSpeechResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/fish_audio/text_to_speech';\n\n/** Generate a RunAPI-managed MP3 from text. */\nexport class TextToSpeech {\n constructor(private readonly http: HttpClient) {}\n\n /** Generate speech synchronously. */\n async run(params: TextToSpeechParams, options?: RequestOptions): Promise<TextToSpeechResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-speech'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TextToSpeechResponse>('POST', ENDPOINT, { body, ...options });\n }\n}\n","export const contract = {\n \"text-to-speech\": {\n \"models\": [\n \"s1\",\n \"s2-pro\"\n ],\n \"fields_by_model\": {\n \"s1\": {\n \"text\": {\n \"required\": true\n }\n },\n \"s2-pro\": {\n \"text\": {\n \"required\": true\n }\n }\n }\n }\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eAA+C;;;ACC/C,kBAA8C;;;ACDvC,IAAM,WAAW;AAAA,EACtB,kBAAkB;AAAA,IAChB,UAAU;AAAA,MACR;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,MAAM;AAAA,QACJ,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MACA,UAAU;AAAA,QACR,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;ADdA,IAAM,WAAW;AAGV,IAAM,eAAN,MAAmB;AAAA,EACxB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA;AAAA,EAG7B,MAAM,IAAI,QAA4B,SAAyD;AAC7F,UAAM,WAAO,2BAAc,MAAM;AACjC,oCAAe,SAAS,gBAAgB,GAAmB,IAA+B;AAC1F,WAAO,KAAK,KAAK,QAA8B,QAAQ,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;AAAA,EACvF;AACF;;;ADbO,IAAM,kBAAN,cAA8B,wBAAW;AAAA;AAAA,EAE9B;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,eAAe,IAAI,aAAa,KAAK,IAAI;AAAA,EAChD;AACF;;;ADTA,IAAAC,eAUO;","names":["import_core","import_core"]} | ||
| {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/text-to-speech.ts","../src/contract_gen.ts"],"sourcesContent":["export { FishAudioClient } from './client';\nexport * from './types';\n\nexport {\n AuthenticationError,\n InsufficientCreditsError,\n NetworkError,\n NotFoundError,\n RateLimitError,\n RunApiError,\n ServiceUnavailableError,\n TimeoutError,\n ValidationError,\n} from '@runapi.ai/core';\n","import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToSpeech } from './resources/text-to-speech';\n\n/** Fish Audio speech generation client. */\nexport class FishAudioClient extends BaseClient {\n /** Generate speech from text. */\n public readonly textToSpeech: TextToSpeech;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.textToSpeech = new TextToSpeech(this.http);\n }\n}\n","import type { ActionSchema, HttpClient, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { TextToSpeechParams, TextToSpeechResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/fish_audio/text_to_speech';\n\n/** Generate a RunAPI-managed MP3 from text. */\nexport class TextToSpeech {\n constructor(private readonly http: HttpClient) {}\n\n /** Generate speech synchronously. */\n async run(params: TextToSpeechParams, options?: RequestOptions): Promise<TextToSpeechResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-speech'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TextToSpeechResponse>('POST', ENDPOINT, { body, ...options });\n }\n}\n","export const contract = {\n \"text-to-speech\": {\n \"models\": [\n \"s1\",\n \"s2-pro\"\n ],\n \"fields_by_model\": {\n \"s1\": {\n \"model\": {\n \"required\": true\n },\n \"text\": {\n \"required\": true\n }\n },\n \"s2-pro\": {\n \"model\": {\n \"required\": true\n },\n \"text\": {\n \"required\": true\n }\n }\n }\n }\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eAA+C;;;ACC/C,kBAA8C;;;ACDvC,IAAM,WAAW;AAAA,EACtB,kBAAkB;AAAA,IAChB,UAAU;AAAA,MACR;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,MAAM;AAAA,QACJ,SAAS;AAAA,UACP,YAAY;AAAA,QACd;AAAA,QACA,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MACA,UAAU;AAAA,QACR,SAAS;AAAA,UACP,YAAY;AAAA,QACd;AAAA,QACA,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;ADpBA,IAAM,WAAW;AAGV,IAAM,eAAN,MAAmB;AAAA,EACxB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA;AAAA,EAG7B,MAAM,IAAI,QAA4B,SAAyD;AAC7F,UAAM,WAAO,2BAAc,MAAM;AACjC,oCAAe,SAAS,gBAAgB,GAAmB,IAA+B;AAC1F,WAAO,KAAK,KAAK,QAA8B,QAAQ,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;AAAA,EACvF;AACF;;;ADbO,IAAM,kBAAN,cAA8B,wBAAW;AAAA;AAAA,EAE9B;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,eAAe,IAAI,aAAa,KAAK,IAAI;AAAA,EAChD;AACF;;;ADTA,IAAAC,eAUO;","names":["import_core","import_core"]} |
+6
-0
@@ -16,2 +16,5 @@ // src/client.ts | ||
| "s1": { | ||
| "model": { | ||
| "required": true | ||
| }, | ||
| "text": { | ||
@@ -22,2 +25,5 @@ "required": true | ||
| "s2-pro": { | ||
| "model": { | ||
| "required": true | ||
| }, | ||
| "text": { | ||
@@ -24,0 +30,0 @@ "required": true |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../src/client.ts","../src/resources/text-to-speech.ts","../src/contract_gen.ts","../src/index.ts"],"sourcesContent":["import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToSpeech } from './resources/text-to-speech';\n\n/** Fish Audio speech generation client. */\nexport class FishAudioClient extends BaseClient {\n /** Generate speech from text. */\n public readonly textToSpeech: TextToSpeech;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.textToSpeech = new TextToSpeech(this.http);\n }\n}\n","import type { ActionSchema, HttpClient, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { TextToSpeechParams, TextToSpeechResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/fish_audio/text_to_speech';\n\n/** Generate a RunAPI-managed MP3 from text. */\nexport class TextToSpeech {\n constructor(private readonly http: HttpClient) {}\n\n /** Generate speech synchronously. */\n async run(params: TextToSpeechParams, options?: RequestOptions): Promise<TextToSpeechResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-speech'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TextToSpeechResponse>('POST', ENDPOINT, { body, ...options });\n }\n}\n","export const contract = {\n \"text-to-speech\": {\n \"models\": [\n \"s1\",\n \"s2-pro\"\n ],\n \"fields_by_model\": {\n \"s1\": {\n \"text\": {\n \"required\": true\n }\n },\n \"s2-pro\": {\n \"text\": {\n \"required\": true\n }\n }\n }\n }\n} as const;\n","export { FishAudioClient } from './client';\nexport * from './types';\n\nexport {\n AuthenticationError,\n InsufficientCreditsError,\n NetworkError,\n NotFoundError,\n RateLimitError,\n RunApiError,\n ServiceUnavailableError,\n TimeoutError,\n ValidationError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,kBAAsC;;;ACC/C,SAAS,eAAe,sBAAsB;;;ACDvC,IAAM,WAAW;AAAA,EACtB,kBAAkB;AAAA,IAChB,UAAU;AAAA,MACR;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,MAAM;AAAA,QACJ,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MACA,UAAU;AAAA,QACR,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;ADdA,IAAM,WAAW;AAGV,IAAM,eAAN,MAAmB;AAAA,EACxB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA;AAAA,EAG7B,MAAM,IAAI,QAA4B,SAAyD;AAC7F,UAAM,OAAO,cAAc,MAAM;AACjC,mBAAe,SAAS,gBAAgB,GAAmB,IAA+B;AAC1F,WAAO,KAAK,KAAK,QAA8B,QAAQ,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;AAAA,EACvF;AACF;;;ADbO,IAAM,kBAAN,cAA8B,WAAW;AAAA;AAAA,EAE9B;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,eAAe,IAAI,aAAa,KAAK,IAAI;AAAA,EAChD;AACF;;;AGTA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]} | ||
| {"version":3,"sources":["../src/client.ts","../src/resources/text-to-speech.ts","../src/contract_gen.ts","../src/index.ts"],"sourcesContent":["import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToSpeech } from './resources/text-to-speech';\n\n/** Fish Audio speech generation client. */\nexport class FishAudioClient extends BaseClient {\n /** Generate speech from text. */\n public readonly textToSpeech: TextToSpeech;\n\n constructor(options: ClientOptions = {}) {\n super(options);\n this.textToSpeech = new TextToSpeech(this.http);\n }\n}\n","import type { ActionSchema, HttpClient, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { contract } from '../contract_gen';\nimport type { TextToSpeechParams, TextToSpeechResponse } from '../types';\n\nconst ENDPOINT = '/api/v1/fish_audio/text_to_speech';\n\n/** Generate a RunAPI-managed MP3 from text. */\nexport class TextToSpeech {\n constructor(private readonly http: HttpClient) {}\n\n /** Generate speech synchronously. */\n async run(params: TextToSpeechParams, options?: RequestOptions): Promise<TextToSpeechResponse> {\n const body = compactParams(params);\n validateParams(contract['text-to-speech'] as ActionSchema, body as Record<string, unknown>);\n return this.http.request<TextToSpeechResponse>('POST', ENDPOINT, { body, ...options });\n }\n}\n","export const contract = {\n \"text-to-speech\": {\n \"models\": [\n \"s1\",\n \"s2-pro\"\n ],\n \"fields_by_model\": {\n \"s1\": {\n \"model\": {\n \"required\": true\n },\n \"text\": {\n \"required\": true\n }\n },\n \"s2-pro\": {\n \"model\": {\n \"required\": true\n },\n \"text\": {\n \"required\": true\n }\n }\n }\n }\n} as const;\n","export { FishAudioClient } from './client';\nexport * from './types';\n\nexport {\n AuthenticationError,\n InsufficientCreditsError,\n NetworkError,\n NotFoundError,\n RateLimitError,\n RunApiError,\n ServiceUnavailableError,\n TimeoutError,\n ValidationError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,kBAAsC;;;ACC/C,SAAS,eAAe,sBAAsB;;;ACDvC,IAAM,WAAW;AAAA,EACtB,kBAAkB;AAAA,IAChB,UAAU;AAAA,MACR;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,MAAM;AAAA,QACJ,SAAS;AAAA,UACP,YAAY;AAAA,QACd;AAAA,QACA,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MACA,UAAU;AAAA,QACR,SAAS;AAAA,UACP,YAAY;AAAA,QACd;AAAA,QACA,QAAQ;AAAA,UACN,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;ADpBA,IAAM,WAAW;AAGV,IAAM,eAAN,MAAmB;AAAA,EACxB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA;AAAA,EAG7B,MAAM,IAAI,QAA4B,SAAyD;AAC7F,UAAM,OAAO,cAAc,MAAM;AACjC,mBAAe,SAAS,gBAAgB,GAAmB,IAA+B;AAC1F,WAAO,KAAK,KAAK,QAA8B,QAAQ,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAC;AAAA,EACvF;AACF;;;ADbO,IAAM,kBAAN,cAA8B,WAAW;AAAA;AAAA,EAE9B;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,eAAe,IAAI,aAAa,KAAK,IAAI;AAAA,EAChD;AACF;;;AGTA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]} |
+1
-1
@@ -6,3 +6,3 @@ { | ||
| }, | ||
| "version": "0.1.2", | ||
| "version": "0.1.3", | ||
| "description": "RunAPI Fish Audio SDK for speech generation in JavaScript, Python, Ruby, Go, Java, and PHP", | ||
@@ -9,0 +9,0 @@ "main": "./dist/index.js", |
27415
2.41%227
5.58%