The practical cordova-plugin-tts alternative for a Capacitor app is @capgo/capacitor-speech-synthesis. It keeps text to speech on native AVSpeech and Android TTS engines, expands the Cordova TTS object into typed promises, and documents queue control, voice lists, and file export. This guide covers npm facts, install steps, usage, and an API map for your Cordova to Capacitor move.
Why leave cordova-plugin-tts in Capacitor
cordova-plugin-tts on npm is version 0.2.3. The registry modified timestamp is 16 January 2024. The npm repository URL points to vilic/cordova-plugin-tts.
The README documents a global TTS object with:
speak(text)orspeak({ text, locale, rate, category })returning a Promisestop()to halt speechcheckLanguage()returning a language stringopenInstallTts()to open the Android TTS installer- an empty
speak('')call to interrupt queued speech
Cordova exposes a minimal surface: no pause or resume, no utterance events, no voice picker API, and rate is documented as 0 to 1 on the Cordova side.
@capgo/capacitor-speech-synthesis latest on npm is 8.0.29 with a modified date of 12 November 2026. src/definitions.ts documents speak, synthesizeToFile, cancel, pause, resume, isSpeaking, isAvailable, getVoices, getLanguages, addListener('start' | 'end' | 'boundary' | 'error'), and iOS activateAudioSession. Capgo ships fixes on an open source cadence where a human still reviews, tests and merges 50+ pull requests daily.
Install
bun add @capgo/capacitor-speech-synthesis
bunx cap sync
No extra plist keys are required beyond what your app already uses for playback. On Android, ensure the device has a TTS engine installed (the Cordova plugin used openInstallTts() for that case).
Usage example
import { SpeechSynthesis } from '@capgo/capacitor-speech-synthesis';
export async function announceTurn(direction: string) {
const { isAvailable } = await SpeechSynthesis.isAvailable();
if (!isAvailable) throw new Error('Speech synthesis unavailable');
const { utteranceId } = await SpeechSynthesis.speak({
text: direction,
language: 'en-US',
rate: 1.0,
pitch: 1.0,
volume: 1.0,
queueStrategy: 'Flush',
});
await new Promise<void>((resolve) => {
void SpeechSynthesis.addListener('end', (event) => {
if (event.utteranceId === utteranceId) {
console.log('Finished', utteranceId);
resolve();
}
});
});
}
Migrating from Cordova to Capacitor
// Before (Cordova)
TTS.speak({ text: 'hello, world!', locale: 'en-GB', rate: 0.75 });
// After (Capacitor)
import { SpeechSynthesis } from '@capgo/capacitor-speech-synthesis';
await SpeechSynthesis.speak({
text: 'hello, world!',
language: 'en-GB',
rate: 0.75,
});
// Before (Cordova)
TTS.stop();
// After (Capacitor)
await SpeechSynthesis.cancel();
API mapping table
cordova-plugin-tts (TTS) |
@capgo/capacitor-speech-synthesis |
|---|---|
speak(text) |
speak({ text }) returns { utteranceId } |
speak({ text, locale, rate }) |
speak({ text, language: locale, rate }) (Capgo rate range is 0.1 to 10.0 per SpeakOptions) |
speak({ category }) (iOS ambient) |
activateAudioSession({ category: 'Ambient' or 'Playback' }) |
stop() |
cancel() |
Empty string interrupt via speak('') |
cancel() or speak({ text: '...', queueStrategy: 'Flush' }) |
checkLanguage() |
getLanguages() or isLanguageAvailable({ language }) |
openInstallTts() (Android) |
Open system TTS settings from your UI; not wrapped in Capgo |
| Not in Cordova | pause(), resume(), isSpeaking(), getVoices(), synthesizeToFile(), addListener('start', 'end', 'boundary', 'error') |
| Cordova plugin install | bun add @capgo/capacitor-speech-synthesis plus bunx cap sync |
Links and next steps
- Plugin docs: https://capgo.app/docs/plugins/speech-synthesis/
- Marketing page: /plugins/capacitor-speech-synthesis/
- npm: https://www.npmjs.com/package/@capgo/capacitor-speech-synthesis
- GitHub: https://github.com/Cap-go/capacitor-speech-synthesis/
- Cordova upstream: https://github.com/vilic/cordova-plugin-tts
Ship native builds with Capgo Build, then deliver prompt copy changes with Capgo live updates. For the full platform move, read the Cordova to Capacitor migration guide.