[solved] change Matlab speech tongue
7 views (last 30 days)
Show older comments
Hello
I use thiese commands to have Matlab read text:
NET.addAssembly('System.Speech');
obj = System.Speech.Synthesis.SpeechSynthesizer;
obj.Volume = 100;
Speak(obj, 'text français uniquement' );
I live in France, I want to have it speak english text, but it only reads french correclty
I tried to change the narrator in Windows 10 but seems to have no effect
My question: how to set the tongue to english when it is french?
thank you
0 Comments
Answers (1)
Edu Benet Cerda
on 20 Feb 2020
Moved: Walter Roberson
on 5 Aug 2025
The Speech Synthesizer will have access to any language installed in the computer. Hence, assuming that you have English installed, you should be able to change the voice such that it gets and English speaker.
You can run the code below in MATLAB to get a list of all the installed voices:
NET.addAssembly('System.Speech');
obj = System.Speech.Synthesis.SpeechSynthesizer;
voices = obj.GetInstalledVoices;
for i = 1 : voices.Count
voice = Item(voices,i-1);
voice.VoiceInfo.Name
end
and then you should be able to select the voice by doing:
obj.SelectVoice('Microsoft David Desktop') % You need to add here the string corresponding to the right voice. This is just the one I had installed.
obj.Speak('text français uniquement')
However, for further information I would recommend you reaching to Microsoft since they are the ones developing that package.
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!