@speechify/ai-sdk-provider 0.1.0 → 0.2.0
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 +6 -5
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# SpeechifyAI provider for the Vercel AI SDK
|
|
2
2
|
|
|
3
3
|
`@speechify/ai-sdk-provider` adds [SpeechifyAI](https://speechify.ai) text to speech to the [Vercel AI SDK](https://ai-sdk.dev).
|
|
4
|
-
It implements the AI SDK's speech model specification (`SpeechModelV4`), so `generateSpeech()` works with Speechify's Simba 3 models and returns word-level speech marks with every clip.
|
|
4
|
+
It implements the AI SDK's speech model specification (`SpeechModelV4`), so `generateSpeech()` works with Speechify's Simba 3 models, including Simba 3.5, and returns word-level speech marks with every clip.
|
|
5
5
|
It is maintained by Speechify and calls [`POST /v1/audio/speech`](https://docs.speechify.ai/build/api-reference/v1/audio/speech) with `fetch`, with no other runtime dependency.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
@@ -26,7 +26,7 @@ import { generateSpeech } from 'ai';
|
|
|
26
26
|
import { speechify } from '@speechify/ai-sdk-provider';
|
|
27
27
|
|
|
28
28
|
const { audio, providerMetadata } = await generateSpeech({
|
|
29
|
-
model: speechify.speech('simba-3.
|
|
29
|
+
model: speechify.speech('simba-3.5'),
|
|
30
30
|
text: 'Hello from Speechify and the AI SDK.',
|
|
31
31
|
voice: 'harper_32',
|
|
32
32
|
});
|
|
@@ -59,11 +59,12 @@ const speechify = createSpeechify({
|
|
|
59
59
|
|
|
60
60
|
| Model | Languages |
|
|
61
61
|
| --- | --- |
|
|
62
|
-
| `simba-3.
|
|
62
|
+
| `simba-3.5` | Newest model, and the one to start with. 48 languages, works with every voice. |
|
|
63
|
+
| `simba-3.2` | English. Every English voice, cloned voices included. |
|
|
63
64
|
| `simba-3.0` | English, German, Spanish (Spain and Mexico), French, Italian and Brazilian Portuguese. |
|
|
64
65
|
|
|
65
66
|
A voice works with a model when the model is in that voice's `models` list in [`GET /v1/voices`](https://docs.speechify.ai/build/api-reference/v1/voices/get).
|
|
66
|
-
`harper_32` is the default and works with
|
|
67
|
+
`harper_32` is the default voice and works with every model.
|
|
67
68
|
A voice the model cannot serve fails with a `400`, and an unknown voice with a `404`.
|
|
68
69
|
|
|
69
70
|
## Options
|
|
@@ -83,7 +84,7 @@ A voice the model cannot serve fails with a `400`, and an unknown voice with a `
|
|
|
83
84
|
|
|
84
85
|
```ts
|
|
85
86
|
const { audio } = await generateSpeech({
|
|
86
|
-
model: speechify.speech('simba-3.
|
|
87
|
+
model: speechify.speech('simba-3.5'),
|
|
87
88
|
text: 'Guten Tag, das ist ein kurzer Test.',
|
|
88
89
|
voice: 'anton',
|
|
89
90
|
language: 'de',
|
package/dist/index.cjs
CHANGED
|
@@ -284,7 +284,7 @@ function errorMessage(error) {
|
|
|
284
284
|
//#endregion
|
|
285
285
|
//#region src/version.ts
|
|
286
286
|
/** This package's version, injected from package.json at build time. */
|
|
287
|
-
const VERSION = "0.
|
|
287
|
+
const VERSION = "0.2.0";
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region src/speechify-provider.ts
|
|
290
290
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -3,10 +3,11 @@ import { ProviderV4, SpeechModelV4 } from "@ai-sdk/provider";
|
|
|
3
3
|
/**
|
|
4
4
|
* Speech models served by `POST /v1/audio/speech`.
|
|
5
5
|
*
|
|
6
|
-
* - `simba-3.
|
|
6
|
+
* - `simba-3.5`: newest model. 48 languages, works with every voice.
|
|
7
|
+
* - `simba-3.2`: English. Every English voice, cloned voices included.
|
|
7
8
|
* - `simba-3.0`: English plus de-DE, es-ES, es-MX, fr-FR, it-IT and pt-BR.
|
|
8
9
|
*/
|
|
9
|
-
type SpeechifySpeechModelId = 'simba-3.2' | 'simba-3.0' | (string & {});
|
|
10
|
+
type SpeechifySpeechModelId = 'simba-3.5' | 'simba-3.2' | 'simba-3.0' | (string & {});
|
|
10
11
|
/** Values of the API's `audio_format` field. */
|
|
11
12
|
declare const SPEECHIFY_AUDIO_FORMATS: readonly ["mp3", "wav", "ogg", "aac", "pcm"];
|
|
12
13
|
/** Values of the API's `output_format` field (`codec_sampleRate_bitrate`). */
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import { ProviderV4, SpeechModelV4 } from "@ai-sdk/provider";
|
|
|
3
3
|
/**
|
|
4
4
|
* Speech models served by `POST /v1/audio/speech`.
|
|
5
5
|
*
|
|
6
|
-
* - `simba-3.
|
|
6
|
+
* - `simba-3.5`: newest model. 48 languages, works with every voice.
|
|
7
|
+
* - `simba-3.2`: English. Every English voice, cloned voices included.
|
|
7
8
|
* - `simba-3.0`: English plus de-DE, es-ES, es-MX, fr-FR, it-IT and pt-BR.
|
|
8
9
|
*/
|
|
9
|
-
type SpeechifySpeechModelId = 'simba-3.2' | 'simba-3.0' | (string & {});
|
|
10
|
+
type SpeechifySpeechModelId = 'simba-3.5' | 'simba-3.2' | 'simba-3.0' | (string & {});
|
|
10
11
|
/** Values of the API's `audio_format` field. */
|
|
11
12
|
declare const SPEECHIFY_AUDIO_FORMATS: readonly ["mp3", "wav", "ogg", "aac", "pcm"];
|
|
12
13
|
/** Values of the API's `output_format` field (`codec_sampleRate_bitrate`). */
|
package/dist/index.js
CHANGED
|
@@ -283,7 +283,7 @@ function errorMessage(error) {
|
|
|
283
283
|
//#endregion
|
|
284
284
|
//#region src/version.ts
|
|
285
285
|
/** This package's version, injected from package.json at build time. */
|
|
286
|
-
const VERSION = "0.
|
|
286
|
+
const VERSION = "0.2.0";
|
|
287
287
|
//#endregion
|
|
288
288
|
//#region src/speechify-provider.ts
|
|
289
289
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@speechify/ai-sdk-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "SpeechifyAI text to speech for the Vercel AI SDK: generateSpeech() with Simba 3 models, speech marks included.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Speechify <developers@speechify.ai> (https://speechify.ai)",
|