Replies: 18 comments 10 replies
-
I assume that you were already setting the volume in the AudioKitStream to the maximum: kit.setVolume(100); Are your speakers 4Ohm ? |
Beta Was this translation helpful? Give feedback.
-
I agree that the volume hack will actually make the volume worse. The only explanation that I would have that there is maybe a bug in some of the es8388 where this is messed up. What is your number next to the V2.2 ? Which sketch are you using to test ? |
Beta Was this translation helpful? Give feedback.
-
Please note that both the Kit and Player have some independent volume control. So set
for max volume... I was just testing with the AI_THINKER_ES8388_VOLUME_HACK 1 on my board and the volume is slightly attenuated. So this should not really be used on the 3478 and I guess A202 boards as well... |
Beta Was this translation helpful? Give feedback.
-
Strange on my board this setting is really loud... |
Beta Was this translation helpful? Give feedback.
-
Oh, I tested only the speaker volume - not the headphones... |
Beta Was this translation helpful? Give feedback.
-
Just tested with my earphones from my mobile phone and with max volume it's also quite loud. |
Beta Was this translation helpful? Give feedback.
-
Strange. I tested with some headphones on my board and the volume at max is good. It would be interresting to hear if others with a A202 have the same problem... |
Beta Was this translation helpful? Give feedback.
-
Yes, If you set the log level for the kit to debug. By default it is set to wrning only... |
Beta Was this translation helpful? Give feedback.
-
I laugh at how fabulous your code is. LOL. One line for "URLStream" and it's all set. LOL Well done. And yes, thanks, this shaves off 50% on compile time. |
Beta Was this translation helpful? Give feedback.
-
New sketch: the only object that has setVolume is i2s, and calling setVolume on i2s doesn't result in any invocation of es8388_set_voice_volume()... how SHOULD I be setting volume in this sketch? Thanks. |
Beta Was this translation helpful? Give feedback.
-
That can't be. I just reviewed the logic AudioKitStream.setVolume is calling AudioKit.setVolume() which is calling audio_hal_set_volume() which is linked to es8388_set_voice_volume() Did you set the log level with Did you also define your board in AudioKitSettings.h ? |
Beta Was this translation helpful? Give feedback.
-
I swapped the code to KIT_LOGI ..same thing?
On June 25, 2022 4:58:58 p.m. EDT, Phil Schatzmann ***@***.***> wrote:
That can't be. I just reviewed the logic and I am ending calling es8388_set_voice_volume()
Did you set the log level with
LOGLEVEL_AUDIOKIT = AudioKitDebug;
--
Reply to this email directly or view it on GitHub:
#26 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
--
Sent from mobile
|
Beta Was this translation helpful? Give feedback.
-
Wait: the volume scale for the AudioKit is from 1 to 100: So max volume is 100. This logic comes from the original Espressif code but I plan to add support for float values as well to be consistent with my AudioKit volumes where 1.0 is max. I am using the streams-url-audiokit.ino sketch and the speaker volume is rather load. With headphones it is just slightly higher then what I would want to use. With 100 I am getting
|
Beta Was this translation helpful? Give feedback.
-
I was getting 6 also. I notice that later on, you set volume to "100" aka 33. That looks right, IE bug free. I may be going crazy, but I thought I tried the experiment setting volume to 100, and it was still silent as a mouse. I haven't tried since I put the debug options on, since I was under the impression that setVolume wanted a float from 0 to 1.. which is clearly not the case (default in the original code is set to 0.7) Just so you don't think I'm a TOTAL idiot, I got this idea from your earlier post suggesting "player.setVolume(1.0)" would be max volume. |
Beta Was this translation helpful? Give feedback.
-
The PA is activated on init. There is an automatic headphone detection if you call processActions() in the loop, which is deactivating the speakers when the headphones are inserted. If you want both: that's the default logic and you don't need to do anything... |
Beta Was this translation helpful? Give feedback.
-
Cool: with my latest commit from today you can also use kit.setVolume(1.0) to set the max volume (as an alternative to kit.setVolume(100)). I am not sure what a sound-enhanced robot costume would exactly do, but maybe the arduino-simple-tts might be if interest to play some prerecorded sounds. Or my other TTS libraries to generate some robot voice... |
Beta Was this translation helpful? Give feedback.
-
Out of curiosity, in your travels, did you ever find a proper schematic? The schematic offered doesn't have the interconnection between esp32 and es8388, it just has both the esp32 AND the esp32-module-with-es8388, but no specific details on how the es8388 interconnects with the esp32 and other peripherals. For example, what's connected to DAC2? I dunno! |
Beta Was this translation helpful? Give feedback.
-
So far I found the following:
The problem is that there are at least 6 different variants with different pin assignments and I never found any proper documentation that would relate to the variant... |
Beta Was this translation helpful? Give feedback.
-
The headphone volume is supposed to be adjustable, yeah?
I poked the volume in the main arduino sketch, (set it to 90), and also enabled AI_THINKER_ES8388_VOLUME_HACK, but nothing.
Meanwhile, I just want to ensure I know what's going on in the code (sorry for nub question) but the code in the hack:
res = es_write_reg(ES8388_ADDR, ES8388_DACCONTROL4, volume);
res |= es_write_reg(ES8388_ADDR, ES8388_DACCONTROL5, volume);
Is trying to set Register 4 of the ES8388, known as "DAC Power Management", yeah? If so, this is a bit-field, and setting it to just any old volume integer from 0-100 is likely to cause unexpected behavior, yeah? Or is DACCONTROL4 NOT, in fact, "Register 4" as documented in the Everest 8388 DS.pdf?
Beta Was this translation helpful? Give feedback.
All reactions