text-to-speech
Note de l’éditeur : This file was selected as MATLAB Central Pick of the Week
TTS text to speech.
TTS (TXT) synthesizes speech from string TXT, and speaks it. The audio format is mono, 16 bit, 16k Hz by default.
WAV = TTS(TXT) does not vocalize but output to the variable WAV.
TTS(TXT,VOICE) uses the specific voice. Use TTS('','List') to see a list of availble voices. Default is the first voice.
TTS(...,PACE) set the pace of speech to PACE. PACE ranges from -10 (slowest) to 10 (fastest). Default 0.
TTS(...,FS) set the sampling rate of the speech to FS kHz. FS must be one of the following: 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000. Default 16.
This function requires the Mirosoft Win32 Speech API (SAPI).
Examples:
% Speak the text;
tts('I can speak.');
% List availble voices;
tts('I can speak.','List');
% Do not speak out, store the speech in a variable;
w = tts('I can speak.',[],-4,44100);
wavplay(w,44100);
Citation pour cette source
Siyi Deng (2024). text-to-speech (https://www.mathworks.com/matlabcentral/fileexchange/18091-text-to-speech), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > Audio and Video Data >
- Signal Processing > Signal Processing Toolbox > Transforms, Correlation, and Modeling > Transforms > Discrete Fourier and Cosine Transforms >
Tags
Remerciements
Inspiré par : tts version 1.0
A inspiré : TMM reflectivity simulator for DBR microcavity polaritons, Sudoku Solver with Computer Voice, Number to Words, TACTICS Toolbox, Interval workout timer
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0.0 |