How to use AudioDeviceReader (an Audio Toolbox function) in MatLab WebApp to listen the microphone of the computer?
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Hari
2024 年 1 月 16 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulation, Tuning, and Visualization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!