Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ Thanks for adding to the Speechify Cookbook! The full, authoritative checklist l
3. Read the language guide:
[`typescript-recipes.md`](./agents/typescript-recipes.md) or
[`python-recipes.md`](./agents/python-recipes.md), and the API reference
[`speechify-tts.md`](./agents/speechify-tts.md) /
[`voice-agents.md`](./agents/voice-agents.md).
[`speechify-tts.md`](./agents/speechify-tts.md).
4. Write the recipe + a README following the fixed template.
5. Update [`README.md`](./README.md) and [`COVERAGE.md`](./COVERAGE.md).
6. Run `pnpm format`, then verify the recipe runs from a clean state.
Expand Down
2 changes: 1 addition & 1 deletion agents/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Keeping the cookbook consistent as it grows.

The Speechify API evolves. Before trusting a method name or response field, check the
installed SDK or the live docs (`https://docs.speechify.ai/llms.txt` is a good index). If
reality differs from the notes in `agents/speechify-tts.md` or `agents/voice-agents.md`,
reality differs from the notes in `agents/speechify-tts.md`,
trust the API and update those files in the same change.
2 changes: 1 addition & 1 deletion agents/monorepo.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ speechify-cookbook/

| Folder | What | Status |
| -------- | ------------------------------------------- | --------------------------------------- |
| `audio/` | Text-to-Speech, plus future audio products. | Active. TypeScript + Python on v2 SDKs. |
| `audio/` | Text-to-Speech, plus future audio products. | Active. TypeScript + Python on v4 SDKs. |

## Languages and tooling

Expand Down
16 changes: 8 additions & 8 deletions agents/speechify-tts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Both SDKs read `SPEECHIFY_API_KEY` from the environment. The deprecated

## Synthesize speech

**TypeScript** (`@speechify/api` v3)
**TypeScript** (`@speechify/api` v4)

```ts
import { SpeechifyClient } from "@speechify/api";
Expand All @@ -34,7 +34,7 @@ import fs from "node:fs";
fs.writeFileSync("output.mp3", Buffer.from(response.audio_data, "base64"));
```

**Python** (`speechify-api` v3)
**Python** (`speechify-api` v4)

```python
from speechify import Speechify
Expand All @@ -60,12 +60,12 @@ with open("output.mp3", "wb") as f:

## Parameters

| Param | Notes |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `input` | Text (or SSML) to synthesize. Up to ~20,000 characters per request. |
| `voice_id` | A voice identifier, e.g. `geffen_32`. |
| `model` | `simba-3.2` (English, lowest latency) or `simba-3.0` (multilingual: English plus German, Spanish, French, Italian, and Portuguese). |
| `audio_format` | `mp3`, `wav`, `ogg`, `aac`, … |
| Param | Notes |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input` | Text (or SSML) to synthesize. Limits are per endpoint: 2,000 characters for `audio.speech`, 20,000 for `audio.stream` / `audio.stream_with_timestamps` (<https://docs.speechify.ai/docs/api-limits>). |
| `voice_id` | A voice identifier, e.g. `geffen_32`. |
| `model` | `simba-3.2` (English, lowest latency) or `simba-3.0` (multilingual: English plus German, Spanish, French, Italian, and Portuguese). |
| `audio_format` | `mp3`, `wav`, `ogg`, `aac`, … |

## Capabilities to build recipes around

Expand Down
2 changes: 1 addition & 1 deletion recipes/audio/typescript/sdk/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ You'll get an `output.mp3` in this folder.
## What it does

- Creates a `SpeechifyClient` with your API key.
- Calls `client.audio.speech(...)` with `input`, `voiceId`, `audioFormat`, and `model`
- Calls `client.audio.speech(...)` with `input`, `voice_id`, `audio_format`, and `model`
(`simba-3.2` for English, lowest latency; `simba-3.0` for multilingual — English plus German, Spanish, French, Italian, and Portuguese).
- Decodes the base64 `response.audio_data` and writes it to disk.
2 changes: 1 addition & 1 deletion recipes/audio/typescript/sdk/speech-marks/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function main() {

fs.writeFileSync("output.mp3", Buffer.from(response.audio_data, "base64"));

// `speechMarks.chunks` holds one entry per word, with start/end times in the audio.
// `speech_marks.chunks` holds one entry per word, with start/end times in the audio.
const words = response.speech_marks.chunks;

// Build a WebVTT file with one cue per word — the basis for karaoke-style highlighting.
Expand Down
Loading