Skip to content

CLI Tool

A command-line tool that synthesizes text to speech and saves audio to a file. Uses @responsivevoice/api-client directly — server-side only, no browser involvement.

Terminal window
export RESPONSIVEVOICE_API_KEY="your-api-key" # https://app.responsivevoice.org
export RESPONSIVEVOICE_API_SECRET="your-api-secret" # "Server-to-server API secrets"
npm install
npm run cli -- "Hello, world!" --output hello.mp3

Unlike the browser examples, the CLI has no demo mode — the API client requires a valid key and secret to make HTTP requests to the synthesis endpoint. The README in the source tree lists every flag (--voice, --rate, --pitch, --volume, --stdout, --list-voices).