in speech editing i am receiving an error using sound. ??? Error using ==> playsnd Data must have one or two columns. Error in ==> sound at 58 playsnd(y,fs,bits); is there any problem with sound function?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
yfirst= y(1:24000);
ysecond=y(24001:48000);
save anjali ysecond yfirst -ascii
load anjali -ascii
t=0:1/fs:length(anjali)/fs-1/fs;
pause(2)
sound(anjali,fs);
0 comentarios
Respuesta aceptada
Walter Roberson
el 8 de Abr. de 2013
I suspect that if you check, you will find that anjali is either 24000 or 48000 columns, possibly with two rows. sound() requires that it be either one or two columns.
If you are trying to use those values as two channels, then you should just be using
anjali = reshape( y(1:48000), 24000, 2 );
sound(anjali, fs);
with none of that save and load.
5 comentarios
anjali parashar
el 8 de Abr. de 2013
Editada: Walter Roberson
el 8 de Abr. de 2013
Walter Roberson
el 8 de Abr. de 2013
silence = zeros(2 * fs, size(y,2)); %2 seconds
anjali = [y; silence; y];
sound(anjali, fs);
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!