Closed playground closed 3 years ago
.pio/libdeps/m5stack-core-esp32/Audio/Audio.h:31:2: error: #error "Teensyduino version 1.20 or later is required to compile the Audio library."
Platformio is not something I use so I cannot test your issue.
I think you might have the wrong Audio.h
installed somehow. You are sure you added the correct library?
Because the error above is not anywhere in ESP32-audioI2S
.
Hmm, when I search, this is the only lib that comes back. Is there another Audio library I should be installing?
pio lib search ESP32-audioI2S
Found 1 libraries:
An esp32 library for the wm8978 dac. Easy setup for the wm8978 dac with configurable i2c and i2s interfaces.
Keywords: signal, input, output Compatible frameworks: Arduino Compatible platforms: Espressif 32 Authors: Cellie
Not really sure what you are trying to do.
What are you trying to compile?
yes, it's failing to build.
@CelliesProjects got it to build and upload by pulling in the latest platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#master
However, it seems to hang at dac_begin(I2C_SDA, I2C_SCL) with no error in
void setup() { delay(1000); Serial.begin(115200);
/ Setup wm8978 I2C interface / if (!dac.begin(I2C_SDA, I2C_SCL)) { ESP_LOGE(TAG, "Error setting up dac. System halted"); while (1) delay(100); } }
You could try to setup I2C before the wm8978.
void setup() {
Serial.begin(115200);
if (!Wire.begin(I2C_SDA, I2C_SCL, 400000))
Serial.println( "i2c setup error");
if (!dac.begin())
Serial.println("WM8978 setup error");
else
Serial.println("WM8978 setup success");
}
@CelliesProjects
I tried the following, it doesn't hang, `void setup() { Serial.begin(115200); if (!Wire.begin(I2C_SDA, I2C_SCL, 400000)) Serial.println( "i2c setup error");
if (!dac.begin(I2C_SDA, I2C_SCL)) Serial.println("WM8978 setup error"); else Serial.println("WM8978 setup success");
audio.i2s_mclk_pin_select(I2S_MCLKPIN);
ESP_LOGI(TAG, "Connected. Starting MP3..."); // audio.connecttohost("http://icecast.omroep.nl/3fm-bb-mp3"); audio.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");
dac.setSPKvol(40); / max 63 / dac.setHPvol(32, 32); }`
but nothing is playing with
audio.connecttohost("http://icecast.omroep.nl/3fm-bb-mp3");
with
audio.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");
get error `WM8978 setup error assertion "Invalid mbox" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/tcpip.c", line 374, function: tcpip_send_msg_wait_sem abort() was called at PC 0x4014c567 on core 1
ELF file SHA256: 0000000000000000
Backtrace: 0x40088dc8:0x3ffb1a40 0x40089045:0x3ffb1a60 0x4014c567:0x3ffb1a80 0x40134a27:0x3ffb1ab0 0x40149bc1:0x3ffb1ae0 0x40149d74:0x3ffb1b00 0x40148c70:0x3ffb1b40 0x40174e9b:0x3ffb1b60 0x40174b96:0x3ffb1de0 0x40174cd1:0x3ffb1e10 0x400e5b63:0x3ffb1e30 0x400d1639:0x3ffb1f50 0x400f7cfa:0x3ffb1fb0 0x4008a086:0x3ffb1fd0
Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 188777542, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8`
Unsure.
You can decode the backtrace with https://github.com/me-no-dev/EspExceptionDecoder
Hmm, I notice in your example does not provide any params to dac.begin() which will not build for me.
void setup() {
Serial.begin(115200);
if (!Wire.begin(I2C_SDA, I2C_SCL, 400000))
Serial.println( "i2c setup error");
if (!dac.begin())
Serial.println("WM8978 setup error");
else
Serial.println("WM8978 setup success");
}
If I provide the params like so !dac.begin(I2C_SDA, I2C_SCL), it would build and upload successfully to Atom Echo Smart Speaker Development Kit, and the it runs as expected but no audio for either option.
// audio.connecttohost("http://mp3.ffh.de/radioffh/hqlivestream.mp3"); audio.connecttospeech("Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.", "de");
I verified the pin numbers are correct. What could I be doing wrong? / M5Stack Node WM8978 I2C pins /
/ M5Stack Node I2S pins /
/ M5Stack WM8978 MCLK gpio number /
src/main.cpp:151:18: error: no matching function for call to 'WM8978::begin()' if (!dac.begin()) ^ In file included from src/main.cpp:5:0: .pio/libdeps/m5stack-core-esp32/wm8978-esp32/src/WM8978.h:38:10: note: candidate: bool WM8978::begin(uint8_t, uint8_t, uint32_t) bool begin(const uint8_t sda, const uint8_t scl, const uint32_t frequency = 100000); ^ .pio/libdeps/m5stack-core-esp32/wm8978-esp32/src/WM8978.h:38:10: note: candidate expects 3 arguments, 0 provided *** [.pio/build/m5stack-core-esp32/src/main.cpp.o] Error 1
You are trying to compile for Atom Echo Smart Speaker Development Kit
?
Is it not supported?
Has no wm8978 so will not work.
hmm...bummer. Is there another way to get it work with TTS?
Will this one work? https://m5stack.com/products/node-module?variant=16804787978330
Yes should work.
Thanks, will order that and try it out, thanks.
I'm getting this error:
platformio.ini [env:m5stack-core-esp32] platform = espressif32 board = m5stack-core-esp32 framework = arduino upload_speed = 115200 monitor_speed = 115200 lib_deps = hieromon/AutoConnect@^1.2.2 me-no-dev/ESP Async WebServer@^1.2.3 celliesprojects/wm8978-esp32@^1.0.2
`In file included from src/main.cpp:5:0: .pio/libdeps/m5stack-core-esp32/Audio/Audio.h:31:2: error: #error "Teensyduino version 1.20 or later is required to compile the Audio library."
error "Teensyduino version 1.20 or later is required to compile the Audio library."
^ .pio/libdeps/m5stack-core-esp32/Audio/Audio.h:37:24: fatal error: DMAChannel.h: No such file or directory
Looking for DMAChannel.h dependency? Check our library registry! CLI > platformio lib search "header:DMAChannel.h" Web > https://platformio.org/lib/search?query=header:DMAChannel.h compilation terminated. Compiling .pio/build/m5stack-core-esp32/lib3bc/Audio/analyze_fft1024.cpp.o Compiling .pio/build/m5stack-core-esp32/lib3bc/Audio/analyze_fft256.cpp.o Compiling .pio/build/m5stack-core-esp32/lib3bc/Audio/analyze_peak.cpp.o Compiling .pio/build/m5stack-core-esp32/lib3bc/Audio/analyze_print.cpp.o Compiling .pio/build/m5stack-core-esp32/lib3bc/Audio/analyze_tonedetect.cpp.o In file included from .pio/libdeps/m5stack-core-esp32/Audio/analyze_fft1024.cpp:27:0: .pio/libdeps/m5stack-core-esp32/Audio/analyze_fft1024.h:30:25: fatal error: AudioStream.h: No such file or directory