-
Notifications
You must be signed in to change notification settings - Fork 44
Frequently Asked Questions
Question: Which Board do I need to select in Arduino ?
Answer: If the board is based on an ESP32, use the ESP32 Dev Module. If you have a board which uses an s2,s3 or c3 processor use the corresponding Dev Module!
Question: The AudioTools library has a AudioKitStream class. Do I still need to install this library ?
Answer: Absolutely yes: The AudioTools is just implementing an Arduino Stream API on top of the functionality provided by this library.
Question: Unfortunately, after compiling and flashing your code (i.e. player-sd-audiokit), I am getting the following error messages
rst:0x1 (POWERON_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:12804
ho 0 tail 12 room 4
load:0x40080400,len:3032
entry 0x400805e4
[D] AudioKit.h : 173 - audio_tools::AudioKitStreamConfig audio_tools::AudioKitStream::defaultConfig(audio_tools::RxTxMode)
[D] AudioKit.h : 181 - void audio_tools::AudioKitStream::begin(audio_tools::AudioKitStreamConfig)
[I] I2SConfig.h : 78 - rx/tx mode: TX
[I] I2SConfig.h : 79 - port_no: 0
[I] I2SConfig.h : 80 - is_master: Master
[I] I2SConfig.h : 81 - sample rate: 44100
[I] I2SConfig.h : 82 - bits per sample: 16
[I] I2SConfig.h : 83 - number of channels: 2
[I] I2SConfig.h : 84 - i2s_format: I2S_STD_FORMAT
[I] I2SConfig.h : 92 - pin_bck: 14
[I] I2SConfig.h : 93 - pin_ws: 15
[I] I2SConfig.h : 94 - pin_data: 0
[D] AudioKit.h : 31 - AudioKitConfig audio_tools::AudioKitStreamConfig::toAudioKitConfig()
[D] AudioKit.h : 127 - -> AUDIO_HAL_CODEC_MODE_DECODE
[D] AudioKit.h : 94 - audio_hal_iface_format_t audio_tools::AudioKitStreamConfig::toFormat()
[D] AudioKit.h : 109 - -> 0
[D] AudioKit.h : 67 - audio_hal_iface_samples_t audio_tools::AudioKitStreamConfig::toSampleRate()
[D] AudioKit.h : 78 - -> 44100
[D] AudioKit.h : 50 - audio_hal_iface_bits_t audio_tools::AudioKitStreamConfig::toBits()
[D] AudioKit.h : 57 - -> 16
[W] AudioKit.h : 43 - sd_active = true
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: ->Wire.endTransmission: 2
Error: codec init failed!
Error: audio_hal_init
[E] AudioKit.h : 185 - begin faild: please verify your AUDIOKIT_BOARD setting: 5
Answer: As the error message indicates you have selected the wrong AUDIOKIT_BOARD. There are many versions of the AI Thinker AudioKit board new newer ones use a ES8388 audio chip (use 5), the older ones an AC101 (use 6). Unfortunately both of them are v2.2. I think you have an old board, so just change the value to 6 in the configuration as indicated in the readme of the project. If you have a board marked as 2957 it is quite impossible to tell what you have and you need to check all settings. Please note that the setting must be updated in the libraries/arduino-audiokit/src/AudioKitSettings.h file. Using a define in the sketch does not work!
Question: The volume is too low
Answer: You can adjust the volume in the sketch by calling setVolume() method. The value can be between 0 (mute) and 100 (max volume) or 0.0 and 1.0 if you prefer floats. Please note that if you use the AudioPlayer it has an additional volume control (on top of the AudioKit volume). In this case also set player.setVolume(1.0) for max volume.
kit.setVolume(value);
Question: The AI Thinker AudioKit 2957 has a low max volume on speakers as well as headphones.
Answer: In AudioKitSettings.h change setting AI_THINKER_ES8388_VOLUME_HACK to 1
I also added the option 2 based on the proposal provided by rfob
Question: The audio input is too loud or not loud enough!
Answer: - The ADF API unfortunately does not have a standard way to define the microphone gain, but you can use the function provided by the audio driver: e.g. esp_err_t es8388_set_mic_gain(es_mic_gain_t gain); See this discussion.
Question: I am getting compile errors
Answer:
- Make sure that the Compiler warnings are set to default (in the Preferences)
- Make sure that you use a recent ESP32 board implementation version: Versions >= 2.0.0 have been tested however you should use an actual version. E.g. 2.0.9. You can check your verson in the Board Manager