Focused, runnable recipes for the Speechify Text-to-Speech API.
Each recipe is small, self-contained, and does one thing — copy a folder, add your API key, and run it.
# 1. Get an API key: https://console.speechify.ai/api-keys
# 2. Pick a recipe below and follow its README.The fastest path:
cd recipes/audio/typescript/sdk/quickstart
cp .env.example .env # paste your SPEECHIFY_API_KEY
pnpm install && pnpm start # writes output.mp3Recipes are organized by product → language → flavor → recipe:
recipes/<product>/<language>/{sdk,native}/<recipe>/
- SDK — uses an official Speechify SDK for that language.
- Native — calls the REST API directly (no SDK), e.g.
fetchin TS,requestsin Python,curlin Bash.
| Recipe | Flavor | Description |
|---|---|---|
| quickstart | SDK | Synthesize speech to an MP3 file. |
| quickstart | Native | Same, calling the REST API directly with fetch. |
| streaming | SDK | Stream audio to disk as it is generated. |
| streaming | Native | Streaming via raw fetch + pipeline. |
| ssml-emotion | SDK | Control emotion, pitch, rate, pauses & emphasis via SSML. |
| ssml-emotion | Native | Same SSML controls, via raw fetch. |
| speech-marks | SDK | Word-level timestamps → WebVTT captions. |
| speech-marks | Native | Same captions, via raw fetch. |
| voice-cloning | SDK | Clone a voice from a sample, synthesize, then delete it. |
| voice-cloning | Native | Same lifecycle, via raw fetch + multipart FormData. |
| Recipe | Flavor | Description |
|---|---|---|
| quickstart | SDK | Synthesize speech to an MP3 file. |
| quickstart | Native | Same, calling the REST API directly with requests. |
| streaming | SDK | Stream audio to disk as it is generated. |
| streaming | Native | Streaming via raw requests with stream=True. |
| ssml-emotion | SDK | Control emotion, pitch, rate, pauses & emphasis via SSML. |
| ssml-emotion | Native | Same SSML controls, via raw requests. |
| speech-marks | SDK | Word-level timestamps → WebVTT captions. |
| speech-marks | Native | Same captions, via raw requests. |
| voice-cloning | SDK | Clone a voice from a sample, synthesize, then delete it. |
| voice-cloning | Native | Same lifecycle, via raw requests + multipart. |
| Recipe | Flavor | Description |
|---|---|---|
| quickstart | Native | Synthesize speech to an MP3 file with curl + jq. |
| streaming | Native | Stream raw audio bytes straight to disk with curl --no-buffer. |
| ssml-emotion | Native | SSML emotion/prosody via a single curl call (jq builds JSON). |
| speech-marks | Native | Speech marks → WebVTT captions, formatted entirely in jq. |
| voice-cloning | Native | Multipart clone → speech → delete, with an EXIT trap cleanup. |
recipes/audio/<language>/{sdk,native}/<recipe>/
audio/— Text-to-Speech today; the audio platform will expand.<language>—typescript,python, andbash(curl-only, native flavor).sdk— uses the official Speechify SDK for that language.native— calls the REST API directly (no SDK).
This is a pnpm workspace monorepo. TypeScript/JavaScript recipes are workspace members
(shared dependency versions via the pnpm catalog:); Python recipes use uv and are
managed per-recipe.
| Path | What |
|---|---|
recipes/ |
The recipes themselves. |
templates/ |
Copy-to-start scaffolds for new recipes. |
agents/ |
Modular maintenance/usage instructions, loaded on demand via AGENTS.md. |
AGENTS.md |
Entry point for AI agents and contributors. |
- Node 20+ and pnpm for JavaScript/TypeScript recipes.
- Python 3.10+ and uv for Python recipes.
pnpm installat the root sets up all JS recipes.pnpm formatformats the repo with Prettier.
See CONTRIBUTING.md and
agents/creating-a-recipe.md. New recipes start from
templates/.