How to decrease total samples of audio?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I want to decrease total samples of my audio. My SampleRate: 10000 and total samples is 329000 but I want decrease to 44100. I try that downsample method but ı cant succesful. after that ı try to audiowrite(newfile, y, fs2); like this way audiowrite('myaudio.wav',44100,10000) but I got the this error message;
Warning: Data clipped when writing file.
> In audiowrite>clipInputData (line 407)
In audiowrite (line 187)
I would be grateful if someone help me.
2 comentarios
Geoff Hayes
el 14 de Abr. de 2020
Editada: Geoff Hayes
el 14 de Abr. de 2020
Nasuhcan - from your comment SampleRate: 10000 but I want decrease to 44100, are you really trying to reduce the total number of samples, or are you changing the sampling rate? Why 44100? If you are reducing the number of samples from 329000 to 44100 (~13.4% reduction), will you keep the same sampling rate of 10000?
Respuestas (1)
Walter Roberson
el 14 de Abr. de 2020
audiowrite does not resample. The data you pass as the second parameter to it is the samples, so you are passing a single sample with value 44100. Notice how you did not pass your signal y to audiowrite. And NO, you cannot audiowrite a signal and then call audiowrite again with the same file name with the intention that audiowrite would somehow know that your intention was for it to read the file and resample it and write it back.
You should be using resample() to create a modified signal that you audiowrite
0 comentarios
Ver también
Categorías
Más información sobre Multirate Signal Processing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!