# How to set audio input/output path

**URL:** <https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191>\
**Category:** Platform Development\
**Created:** [September 4, 2020, 1:08am UTC](https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191 "2020-09-04T01:08:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![youngyun](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/youngyun/32/377_2.png) [@youngyun](https://forum.webosose.org/u/youngyun)\
**Post date:** [September 4, 2020, 1:08am UTC](https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191/1 "2020-09-04T01:08:31Z")

</div>

Hi.

I'm using a USB audio device with Raspberry pi 4 for audio input/output test.

When I play an audio file in webapp to use the audio element as below, there is no sound on RPi4.

```auto
<audio src="file_example_WAV_5MG.wav" controls>
Your browser does not support the audio tag</audio>

```

![image](https://canada1.discourse-cdn.com/flex031/uploads/developer1/original/1X/868a17dcc9be2a51159860a2181fcf8637ecb49f.png)

However when I do audio test to use pacat on RPi4 with usb sound card,  
my sound(earphone) and microphone are working well.

So, I'd like to know how to set audio setting in webapp for playing music.

Thanks.

---

<div class="post-metadata">

**Author:** ![nicolas](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@nicolas](https://forum.webosose.org/u/nicolas)\
**Post date:** [September 4, 2020, 2:31am UTC](https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191/2 "2020-09-04T02:31:18Z")

</div>

Could you share a testable IPK file that includes an audio file? I will try to test on my RPi. As far as I know, the sound will be outputted through HDMI. So, If your display doesn't have a speaker, you can't hear that.

---

<div class="post-metadata">

**Author:** ![youngyun](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/youngyun/32/377_2.png) [@youngyun](https://forum.webosose.org/u/youngyun)\
**Post date:** [September 4, 2020, 3:57am UTC](https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191/3 "2020-09-04T03:57:45Z")

</div>

Dear @nicolas

Unfortunately, my monitor doesn't have a speaker.  
So I need to change sound input/output path to do audio test.

And I can't upload .zip file with below alert.  
It can be possible to upload only image file.  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/developer1/original/1X/03f539f560f98d6c64c1de581245cf0e86878e6c.png)

Please let me know how to upload zip or ipk file on this page  
or give me your e-mail address via message.

Thanks.

---

<div class="post-metadata">

**Author:** ![nicolas](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@nicolas](https://forum.webosose.org/u/nicolas)\
**Post date:** [September 4, 2020, 4:53am UTC](https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191/4 "2020-09-04T04:53:38Z")

</div>

I tested it on my dev environment. (a RPi4 with webOS OSE 2.6.0, a monitor with speaker)  
The app that you sent worked well. I listened to the guitar sound from the app.

So, do you want to change output channel for audio?

---

<div class="post-metadata">

**Author:** ![youngyun](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/youngyun/32/377_2.png) [@youngyun](https://forum.webosose.org/u/youngyun)\
**Post date:** [September 4, 2020, 5:05am UTC](https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191/5 "2020-09-04T05:05:45Z")

</div>

I download a sample audio file from [https://file-examples.com/index.php/sample-audio-files/sample-wav-download/](https://file-examples.com/index.php/sample-audio-files/sample-wav-download/)

And I'd like to change audio input and output channel using USB sound card.

---

<div class="post-metadata">

**Author:** ![nicolas](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@nicolas](https://forum.webosose.org/u/nicolas)\
**Post date:** [September 4, 2020, 5:19am UTC](https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191/6 "2020-09-04T05:19:37Z")

</div>

Unfortunately, I don't know how to change the audio input/output channel from HDMI to USB sound card. I will ask the Dev Team. But I don't know if I can get an answer.

---

<div class="post-metadata">

**Author:** ![NERGI](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/nergi/32/364_2.png) [@NERGI](https://forum.webosose.org/u/NERGI)\
**Post date:** [September 11, 2020, 2:02am UTC](https://forum.webosose.org/t/how-to-set-audio-input-output-path/1191/7 "2020-09-11T02:02:24Z")

</div>

Hi @youngyun,

I forwarded the answer from dev. team.

> In OSE RPI4, audio playback is supported through USB headset.
> 
> But application need to write audio data to pulse-sink , so that audio framework can route the audio data to usb headset.
> 
> Please check whether you are using Pulsesink or not to write the audio data.
> 
> Also Please run below command in shell during playing the audio file and provide the output .
> 
> **pactl list sinks short**

Thanks
