How to use AudioDeviceReader (an Audio Toolbox function) in MatLab WebApp to listen the microphone of the computer?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have developped a GUI and I am trying to share it by using MatLab WebApp. There is a part that I get sound from the microphone of the computer. For that reason, I am using the AudioDeviceReader function (an Audio Toolbox function). But when I created the web app in this way, the GUI does not show up on the browser. If I remove the AudioDeviceReader part from the code, my GUI shows up on the browser. What should I do to be able to use AudioDeviceReader function in the web app?
If you can help me, I would be very happy. Thank you in advance.
0 comentarios
Respuestas (1)
Hari
el 16 de En. de 2024
Hi Mehmet Ege Can Ulusoy,
I understand that you have developed a GUI in MATLAB that uses the "AudioDeviceReader" function from the Audio Toolbox to capture sound from the computer's microphone. You are encountering an issue where the GUI does not appear in the browser when shared as a MATLAB WebApp whenever the AudioDeviceReader part is included.
The "AudioDeviceReader" function is designed to interface with the audio hardware of the system running MATLAB. When deploying MATLAB applications as WebApps, the server-side MATLAB runtime handles the execution, not the client's browser. Consequently, the AudioDeviceReader cannot directly access the client's audio hardware through the browser for security and architectural reasons.
To capture audio from the client's microphone in a WebApp, you would typically need to implement client-side JavaScript to handle audio capture, which can then be sent to the server. However, MATLAB WebApps currently do not support direct access to client hardware, including microphones, due to the aforementioned limitations.
As a workaround, you might consider alternative approaches such as using a standalone MATLAB application that can be run locally on the user's machine, which would allow direct access to the AudioDeviceReader function.
To understand the capabilities and limitations of MATLAB WebApps, refer the MATLAB Web App Server documentation.
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Simulation, Tuning, and Visualization 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!