[solved] change Matlab speech tongue
조회 수: 8 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Edu Benet Cerda
2020년 2월 20일
이동: Walter Roberson
2025년 8월 5일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!