필터 지우기
필터 지우기

Soundsc and sound not Playing anything

조회 수: 7 (최근 30일)
Michael g
Michael g 2014년 9월 26일
답변: ubaid haroon 2017년 12월 8일
Hi,
I am having issues with the commads soundsc and sound playing anything through my speakers. I know the audio works, since
load handel;
p = audioplayer(y, Fs);
play(p, [1 (get(p, 'SampleRate') * 3)]);
will play properly.
I am trying to get a variable called speech (a value of 22775x1 double) to play. I type into the command window soundsc(speech) (with speech shown in the workspace). No sound happns, and no error is given. It just shows the command window ready for another input.
I cannot find much on soundsc or sound not working correctly. I saw it might have something to do with Java, but that was for a linux machine. I am running Windows 7, and matlab 2011a.
The file works on other comupters, I got my friend to check his. The variable plays no problem. I am unsure what steps to take so it works here.
Thanks
  댓글 수: 1
Daniel Shub
Daniel Shub 2014년 9월 26일
Have you tried playing the speech variable with the audioplayer?

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

답변 (3개)

Youssef  Khmou
Youssef Khmou 2014년 9월 26일
It can be the range of the vector, try sound(y/max(y),Fs).
  댓글 수: 2
Michael g
Michael g 2014년 9월 26일
this does not work. either:
soundsc(speech/max(speech), Fs)
soundsc(y/max(y), Fs)
nothing happes for either of these inputs.
the variable speech has a min and max of -1.7768e+04 and 1.0936e+04
Image Analyst
Image Analyst 2014년 9월 26일
soundsc() does the scaling automatically so that can't be it.

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


Image Analyst
Image Analyst 2014년 9월 26일
Can you attach your "speech" variable in a .mat file with the paperclip icon? In the meantime, you can try the attached demo that creates a warbling sound and plays it. Let me know if it plays sound.

ubaid haroon
ubaid haroon 2017년 12월 8일
It just keeps loading and doesn't play anything. I can't even CTRL+C to stop this. I have to force exit matlab. I am facing the same issue. However, I tried this on my other laptop and it works fine. could possibly be a bug? or some weird setting on that computer. I am not sure.

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by