Can ESP32 output audio streams?

shicongyu666
Posts: 3
Joined: Tue Jan 02, 2018 6:09 am

Can ESP32 output audio streams?

Postby shicongyu666 » Tue Jan 02, 2018 6:28 am

Hello,
I have a product that's going to use esp32, which has a network radio playback function.Now I know ESP32 I2S interface can output the data to a digital power amplifier, and speakers. But I'm not quite sure ESP32 could directly output audio stream.If it can output audio streams, can the program control the amplitude of the audio stream?If it can, I can control the output sound size directly through ESP32, because the current selected analog power amplifier has no volume adjustment function.
I look forward to your reply. Thank you!

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Can ESP32 output audio streams?

Postby ESP_Sprite » Tue Jan 02, 2018 9:01 am

Technically: yes, the ESP32 has two DACs you can use to directly output an analog signal. You can digitally divide the signal going to this to get some kind of volume control. In practice, these DACs are only eight bit, so audio quality won't be exactly HiFi, so you may want to grab an external codec anyway.

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

Re: Can ESP32 output audio streams?

Postby Gfast2 » Tue Jan 02, 2018 7:37 pm

ESP_Sprite wrote:Technically: yes, the ESP32 has two DACs you can use to directly output an analog signal. You can digitally divide the signal going to this to get some kind of volume control. In practice, these DACs are only eight bit, so audio quality won't be exactly HiFi, so you may want to grab an external codec anyway.
Some Off-Shelf Suggestions (tested one with ESP32 if any?)

Cheers

Gfast2

User avatar
hassan789
Posts: 156
Joined: Thu Jun 29, 2017 2:15 am

Re: Can ESP32 output audio streams?

Postby hassan789 » Tue Jan 02, 2018 7:46 pm

Basically, you can output audio via:
PWM
PDM
I2S
DAC

How many watts are you trying to output? 100mW, 1W, 10W?
Are you trying to output to headphones or speakers?

shicongyu666
Posts: 3
Joined: Tue Jan 02, 2018 6:09 am

Re: Can ESP32 output audio streams?

Postby shicongyu666 » Wed Jan 03, 2018 3:05 am

ESP_Sprite wrote:Technically: yes, the ESP32 has two DACs you can use to directly output an analog signal. You can digitally divide the signal going to this to get some kind of volume control. In practice, these DACs are only eight bit, so audio quality won't be exactly HiFi, so you may want to grab an external codec anyway.
You explain it very well, and your suggestion is very applicable.
Thanks!!!

shicongyu666
Posts: 3
Joined: Tue Jan 02, 2018 6:09 am

Re: Can ESP32 output audio streams?

Postby shicongyu666 » Wed Jan 03, 2018 3:07 am

hassan789 wrote:Basically, you can output audio via:
PWM
PDM
I2S
DAC

How many watts are you trying to output? 100mW, 1W, 10W?
Are you trying to output to headphones or speakers?
1W,a speaker.
I see the reply on the 2nd floor is very good, I intend to use his suggestion, use a codec.
Thank you for your reply!

Who is online

Users browsing this forum: Bing [Bot] and 123 guests