0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/voice/speechify
History 2026-10-28 13:15:52 +00:00
..
src fix(voice-speechify): restore speech generation with Simba 3.5 and live voices (#28513) 2026-10-26 17:40:56 -05:00
CHANGELOG.md chore: version - exit prerelease mode 2026-10-28 13:15:52 +00:00
lint-staged.config.js refactor(lint): replace ESLint with type-aware oxlint (#27476) 2026-10-18 10:38:35 -07:00
package.json chore: version - exit prerelease mode 2026-10-28 13:15:52 +00:00
README.md fix(voice-speechify): restore speech generation with Simba 3.5 and live voices (#28513) 2026-10-26 17:40:56 -05:00
tsconfig.build.json chore: fix go-to-definition using tsc declaration maps (#6089) 2025-07-30 15:41:00 -07:00
tsconfig.json chore: migrate package builds to tsdown (#19829) 2026-07-28 12:32:21 +02:00
tsdown.config.ts fix(voice-speechify): restore speech generation with Simba 3.5 and live voices (#28513) 2026-10-26 17:40:56 -05:00
vitest.config.ts refactor: reorganize core tests and namespace vitest projects across monorepo (#12662) 2026-02-09 10:24:48 +01:00

@mastra/voice-speechify

Add Speechify text-to-speech to Mastra with configurable voices, languages, audio formats, synthesis controls, and speaker discovery.

Installation

npm install @mastra/voice-speechify

Usage

Set the API credentials required by your voice provider.

import { SpeechifyVoice } from '@mastra/voice-speechify';

const voice = new SpeechifyVoice({
  speechModel: {
    name: 'simba-3.5', // Optional, defaults to 'simba-3.5'
    apiKey: 'your-api-key', // Optional, can use SPEECHIFY_API_KEY env var
  },
  speaker: 'harper_32', // Optional, defaults to a voice that matches the model
});

// List available speakers, read live from Speechify's catalog
const speakers = await voice.getSpeakers();

// Generate speech
const stream = await voice.speak('Hello world', {
  speaker: 'harper_32', // Optional, defaults to constructor speaker
  language: 'en-US', // Optional, the voice's own locale when omitted
  audioFormat: 'mp3', // Optional: mp3, ogg, aac or pcm
});

// The stream can be piped to a destination
stream.pipe(destination);

Models

  • simba-3.5: the default and Speechify's recommended model. 48 languages on one id, and every catalog voice, cloned voices included, speaks all of them. Pass language to choose one.
  • simba-3.2: English only. A non-English voice returns an error.
  • simba-3.0: English, German, Spanish, French, Italian and Portuguese.
  • simba-english and simba-multilingual: legacy ids. New workspaces get a model_retired error; from 2026-11-21 they are served by simba-3.2 and simba-3.5.

The model can also be overridden per request:

const stream = await voice.speak('Olá, mundo', { language: 'pt-BR' });

Documentation

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.