diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f70052c..b066dca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/agents/maintenance.md b/agents/maintenance.md index 54ba028..b8b17f8 100644 --- a/agents/maintenance.md +++ b/agents/maintenance.md @@ -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. diff --git a/agents/monorepo.md b/agents/monorepo.md index fb42510..b0ed436 100644 --- a/agents/monorepo.md +++ b/agents/monorepo.md @@ -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 diff --git a/agents/speechify-tts.md b/agents/speechify-tts.md index b7c5f3e..a0ee7b8 100644 --- a/agents/speechify-tts.md +++ b/agents/speechify-tts.md @@ -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"; @@ -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 @@ -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` (). | +| `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 diff --git a/recipes/audio/typescript/sdk/quickstart/README.md b/recipes/audio/typescript/sdk/quickstart/README.md index f225fde..af0ba60 100644 --- a/recipes/audio/typescript/sdk/quickstart/README.md +++ b/recipes/audio/typescript/sdk/quickstart/README.md @@ -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. diff --git a/recipes/audio/typescript/sdk/speech-marks/src/index.ts b/recipes/audio/typescript/sdk/speech-marks/src/index.ts index 799e897..d45e4fc 100644 --- a/recipes/audio/typescript/sdk/speech-marks/src/index.ts +++ b/recipes/audio/typescript/sdk/speech-marks/src/index.ts @@ -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.