@mastra/voice-speechify
v0.14.1
Published
Mastra Speechify voice integration
Keywords
Readme
@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-speechifyUsage
Set the API credentials required by your voice provider.
import { SpeechifyVoice } from '@mastra/voice-speechify';
const voice = new SpeechifyVoice({
speechModel: {
name: 'simba-3.2', // Optional, defaults to 'simba-english'
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
const speakers = await voice.getSpeakers();
// Generate speech
const stream = await voice.speak('Hello world', {
speaker: 'harper_32', // Optional, defaults to constructor speaker
// Additional Speechify options
audioFormat: 'mp3',
});
// The stream can be piped to a destination
stream.pipe(destination);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.
