Shared TypeScript type definitions for the ResponsiveVoice text-to-speech ecosystem.
npm install @responsivevoice/types
# or
pnpm add @responsivevoice/types
# or
yarn add @responsivevoice/typesimport type {
Voice,
SystemVoice,
VoiceCollection,
SynthesizeRequest,
SynthesizeResponse,
ResponsiveVoiceConfig,
RVEventType,
RVEventCallback,
TTSService,
AudioFormat,
VoiceGender,
} from '@responsivevoice/types';
// Example: Define a synthesize request
const request: SynthesizeRequest = {
text: 'Hello, world!',
lang: 'en-US',
gender: 'female',
pitch: 0.5,
rate: 0.5,
volume: 1.0,
format: 'mp3',
};
// Example: Configure the client
const config: ResponsiveVoiceConfig = {
apiKey: 'your-api-key',
baseUrl: 'https://texttospeech.responsivevoice.org/v2',
timeout: 30000,
retryAttempts: 3,
};VoiceGender- Voice gender ('male' | 'female')VoiceGenderShort- Short gender identifier ('f' | 'm')TTSService- TTS service identifierAudioFormat- Audio output format ('mp3' | 'ogg' | 'wav')
Voice- High-level ResponsiveVoice voice definitionSystemVoice- Low-level system voice mappingVoiceCollection- Complete voice collectionVoiceQuery- Voice filtering options
SynthesizeRequest- TTS synthesis request payloadSynthesizeResponse- Synthesis response with audio dataAudioResponse- Audio response with playback URLErrorResponse- API error response structure
RVEventType- Event type unionRVEvent- Event payloadRVEventCallback- Event callback function
ResponsiveVoiceConfig- Client configurationSpeakParams- Speech parameters
MIT
Other language SDKs: Python · Go · PHP · Java
AI coding agents: install the ResponsiveVoice skill — npx skills add responsivevoice/skills