Free, Unlimited Speechify API
On this page
In this guide, you will learn how to add Speechify text-to-speech to your app for free, without a Speechify developer account or API keys. Speechify's API is built around the Simba model family, which includes Simba 3.2, Simba English, and Simba Multilingual, along with a set of ready-made voices.
Puter.js uses the User-Pays model, where users of your application cover their own AI costs. This means you as a developer don't pay anything for your users' usage, making your app practically free to run. You can scale to unlimited users and pay nothing for the TTS usage.
Puter.js is also a good fit for AI coding assistants, agents, and vibe coding platforms such as Claude Code, Codex, OpenCode, Lovable, Replit, and Bolt.new. Since it's keyless and serverless, an AI-generated text-to-speech app built on Puter.js runs end-to-end the moment it's generated, with no third-party backend to sign up for, no service to provision, and no API keys to paste in.
Getting Started
Add Puter.js to your project with a single script tag:
<script src="https://js.puter.com/v2/"></script>
If you are using a bundler, install the npm package instead:
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
Both expose the same puter.* API. That's it, you're ready to start integrating Speechify into your application.
Example 1: Generate speech with Speechify
To convert text to speech with Speechify, call puter.ai.txt2speech() with provider: "speechify". With no other options, it uses the simba-3.2 model and the geffen_32 voice:
puter.ai.txt2speech("Hello world! This is Speechify text-to-speech.", {
provider: "speechify",
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
Full code example:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.print("Loading...");
puter.ai.txt2speech("Hello world! This is Speechify text-to-speech.", {
provider: "speechify",
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
</script>
</body>
</html>
The function resolves to an HTMLAudioElement, so you can call audio.play() directly, or attach it to the page with controls as shown above.
Example 2: Choose a different Simba model
Speechify offers three Simba models through Puter.js. Use the model option to pick one:
simba-3.2is the default and the most recent model.simba-englishis tuned for English-only content.simba-multilingualhandles text in languages other than English.
puter.ai.txt2speech("Bonjour tout le monde ! Ceci est un test multilingue.", {
provider: "speechify",
model: "simba-multilingual"
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
Full code example:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.print("Loading...");
puter.ai.txt2speech("Bonjour tout le monde ! Ceci est un test multilingue.", {
provider: "speechify",
model: "simba-multilingual"
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
</script>
</body>
</html>
Example 3: Customize the voice
Use the voice option to pick one of the Speechify voices. The following voice IDs are available:
geffen_32(default), warm and conversationaldominic_32, deep narrator voiceharper_32, bright and upbeathugh_32, calm and professionalimogen_32, clear and neutral
puter.ai.txt2speech("This is the Dominic voice, which works well for narration.", {
provider: "speechify",
model: "simba-3.2",
voice: "dominic_32"
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
Full code example with a voice picker:
<html>
<body>
<textarea id="text-input" rows="4" cols="50">This voice is generated with Speechify through Puter.js.</textarea>
<br>
<select id="voice-select">
<option value="geffen_32">Geffen (warm, conversational)</option>
<option value="dominic_32">Dominic (deep, narrator)</option>
<option value="harper_32">Harper (bright, upbeat)</option>
<option value="hugh_32">Hugh (calm, professional)</option>
<option value="imogen_32">Imogen (clear, neutral)</option>
</select>
<button id="speak-button">Speak</button>
<script src="https://js.puter.com/v2/"></script>
<script>
<html>
<body>
<textarea id="text-input" rows="4" cols="50">This voice is generated with Speechify through Puter.js.</textarea>
<br>
<select id="voice-select">
<option value="geffen_32">Geffen (warm, conversational)</option>
<option value="dominic_32">Dominic (deep, narrator)</option>
<option value="harper_32">Harper (bright, upbeat)</option>
<option value="hugh_32">Hugh (calm, professional)</option>
<option value="imogen_32">Imogen (clear, neutral)</option>
</select>
<button id="speak-button">Speak</button>
<script src="https://js.puter.com/v2/"></script>
<script><html>
<body>
<textarea id="text-input" rows="4" cols="50">This voice is generated with Speechify through Puter.js.</textarea>
<br>
<select id="voice-select">
<option value="geffen_32">Geffen (warm, conversational)</option>
<option value="dominic_32">Dominic (deep, narrator)</option>
<option value="harper_32">Harper (bright, upbeat)</option>
<option value="hugh_32">Hugh (calm, professional)</option>
<option value="imogen_32">Imogen (clear, neutral)</option>
</select>
<button id="speak-button">Speak</button>
<script src="https://js.puter.com/v2/"></script>
<script>
document.getElementById('speak-button').addEventListener('click', () => {
const text = document.getElementById('text-input').value;
const voice = document.getElementById('voice-select').value;
puter.ai.txt2speech(text, {
provider: "speechify",
model: "simba-3.2",
voice: voice
})
.then(audio => {
audio.play();
})
.catch(error => {
console.error('Error:', error);
});
});
</script>
</body>
</html>
Example 4: Set the output format
By default the audio comes back as MP3. Use the output_format option to request mp3, wav, ogg, or aac instead:
puter.ai.txt2speech("This audio is returned as a WAV file.", {
provider: "speechify",
output_format: "wav"
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
Full code example:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.print("Loading...");
puter.ai.txt2speech("This audio is returned as a WAV file.", {
provider: "speechify",
output_format: "wav"
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
</script>
</body>
</html>
Example 5: Control delivery with SSML
Speechify's synthesis endpoint accepts SSML. Puter.js wraps plain strings in a <speak> tag for you, and if your text already starts with <speak>, it is passed through unchanged. This lets you add pauses, emphasis, and other SSML markup:
puter.ai.txt2speech(`<speak>Welcome back. <break time="700ms"/> Your order has <emphasis level="strong">shipped</emphasis>.</speak>`, {
provider: "speechify",
voice: "hugh_32"
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
Full code example:
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.print("Loading...");
puter.ai.txt2speech(`<speak>Welcome back. <break time="700ms"/> Your order has <emphasis level="strong">shipped</emphasis>.</speak>`, {
provider: "speechify",
voice: "hugh_32"
})
.then(audio => {
audio.setAttribute("controls", "");
document.body.appendChild(audio);
});
</script>
</body>
</html>
See the Speechify SSML documentation for the full list of supported tags.
List of Speechify models
You can use the following Speechify models with Puter.js:
simba-3.2
simba-english
simba-multilingual
Conclusion
Using Puter.js, you can access Speechify's Simba models and voices without setting up a Speechify developer account or managing API keys yourself. And thanks to the User-Pays model, you can add this feature for free to your application, since your users cover their own TTS usage, not you as the developer.
You can find more details about the Puter.js text-to-speech API in the documentation.
Related
Ship a Full-Stack App with One Prompt
Build an AI chat app using Puter.js
Coding manually? see the guide