How can i recording audio immediately?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Samuele Sandrini
el 14 de Nov. de 2019
Comentada: Walter Roberson
el 19 de Nov. de 2019
recObj = audiorecorder(8000,16,1)
recordblocking(recObj, 1);
audioarray = getaudiodata(recObj);
plot(audioarray)
I noticed that the registration doesn't start immediately, but it waits about 0.4/0.5 s. You can see this problem with this image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/248400/image.png)
I need that it starts immediately after i run the recording (also because i would like to create small (acquisition windows, about 0.2 s).
I also tried to use pause() and resume() but it has the same problem.
What can i do to solve this problem?
Thanks in advance
Respuesta aceptada
Gaurav Garg
el 19 de Nov. de 2019
Hi,
Given below is a command which will open example for you which will help you record the audio immediately.
openExample('audio/ReadFromMicrophoneAndWriteToAudioFileExample')
Moreover, you can also modify the default properties of your audioDeviceReader object to reduce latency.
openExample('audio/CalculateLatencyDueToDeviceBufferExample')
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio and Video Data 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!