How can represent a recorded speech signal(.wav format) as a binary matrix?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ANJANA KRISHNAN A
el 22 de Feb. de 2017
Comentada: ANJANA KRISHNAN A
el 28 de Feb. de 2017
A audio(in wav format) is read to variable 'p' using wavread().The sample values p contain vary between -1 and +1.what i exactly need is a binary row matrix which represent that wav file as 0's and 1's.
And how can i convert that binary row matrix back to the same audio?
0 comentarios
Respuesta aceptada
Walter Roberson
el 22 de Feb. de 2017
[data, fs] = wavread(FileName, 'native');
Now your data is probably integers or convertible to integers. After that you use dec2bin() and transpose and reshape.
10 comentarios
Walter Roberson
el 28 de Feb. de 2017
If class(data) shows up as int16 rather than uint16, then
data_u16 = typecast(data, 'uint16');
row = reshape( (dec2bin(data_u16, 16) - '0').', 1, [] );
Más respuestas (0)
Ver también
Categorías
Más información sobre Multichannel Audio Input and Output 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!