saying a message in matlab

조회 수: 7 (최근 30일)
mohammad
mohammad 2011년 9월 1일
1-how can say a message Computerized in matlab? for example
if a=b
saying in Computerized ' a and b are matching'
else
saying in Computerized ' a and b are not matching'
end
2-please tell with which command can run a .mp3 in matlab?

채택된 답변

Ken Atwell
Ken Atwell 2011년 9월 1일
You mean have the computer synthesize speech?
  • On Windows, this can be done using .NET. There happens to be an example of this in a blog post on .NET in MATLAB.
  • On a Mac, use the "say" system command:
system('say "Hello, World!"')
  • On Linux, techniques may vary from distro to distro. Links like this and this may be helpful, and then you can use the system command like in the Mac case.
  댓글 수: 2
mohammad
mohammad 2011년 9월 1일
thanks dear
yes i mean 'computer synthesize speech'
i use win
let me check
mohammad
mohammad 2011년 9월 1일
perfect,great!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Wayne King
Wayne King 2011년 9월 1일
Hi Mohammed, If you have the DSP System Toolbox, the System object dsp.AudioFileReader can read an MP3 file on Windows. Additionally, there are mp3write and mp3read utilities on the file exchange, but I would recommend that you just store these as vectors since they are not long utterances. Store them as .mat files that you can load when your program starts and then use soundsc() to play them.
It seems a lot of overhead to be reading these files (whether they are mp3, or WAV, etc).
Wayne
  댓글 수: 1
mohammad
mohammad 2011년 9월 1일
nice,
is it possible matlab says a message(Computerized)?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by