m5stack-avatarのコンパイルエラー(解決済)
M5Stackでかわいい顔を表示しつつリップシンク付きでお話できる、こちらを導入しようと思い試しています。
https://github.com/meganetaaan/m5stack-avatar
https://twitter.com/meganetaaan/status/1013586612746252289
下記のようなコードで、AquesTalkで発話するところまでは行けましたが、m5stack-avatarのコンパイルでエラーが出て、調査中です。
★追記:最新版(0.6.0)でコンパイルエラー発生しないこと確認しました。仕事が早い!
https://github.com/meganetaaan/m5stack-avatar/releases
#include
#include "AquesTalkTTS.h"
void setup()
{
int iret;
Serial.begin(115200);
M5.begin();
// Init Text-to-Speech (AquesTalk-ESP + I2S + Internal-DAC)
iret = TTS.create(NULL);
delay(1000);
}
void loop()
{
const char* koe = "konnichiwa";
TTS.play(koe, 100);
delay(1000*10);
}
環境
- OS:Windows7 64bit
- ArduinoIDE 1.8.5
- ESP32環境 2017/6/21 にgithubから落としてセットアップしたもの。(バージョンはどこで確認できるのかな?)
- M5Stack library 0.2.0
- m5stack-avatar 0.5.0
- AquesTalkは下記参考にインストール済み
http://blog-yama.a-quest.com/?eid=970188
exampleのtalk.inoをコンパイルしようとしています。
lib/にあるAquesTalkTTSのファイルは、srcに手動でコピーしています。
発生したエラー
“const.h” が見当たらない
こちらは、とりあえずコメントアウトしています。
何かインストールするべきものが足りていない?
初期化の順番に関するエラーが発生
下記のようなエラー発生。初期化の順番に関するエラーです。コンパイルオプションによっては無視できるのでしょうか? もしくはESP32環境のバージョン違いによるものか。
いくつか手元で修正してもあちこちで発生していて、頑張れは動きそうな気もしますが、今は諦めています。
"C:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/config" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/bluedroid" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/app_trace" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/app_update" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/bootloader_support" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/bt" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/driver" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/esp32" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/esp_adc_cal" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/ethernet" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/fatfs" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/freertos" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/heap" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/jsmn" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/log" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/mdns" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/mbedtls" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/mbedtls_port" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/newlib" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/nvs_flash" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/openssl" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/spi_flash" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/sdmmc" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/spiffs" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/tcpip_adapter" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/ulp" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/vfs" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/wear_levelling" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/xtensa-debug-module" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/coap" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/console" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/expat" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/json" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/lwip" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/newlib" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/nghttp" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/soc" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/wpa_supplicant" -std=gnu++11 -fno-exceptions -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -c -DF_CPU=240000000L -DARDUINO=10805 -DARDUINO_M5Stack_Core_ESP32 -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="M5Stack_Core_ESP32" -DARDUINO_VARIANT="m5stack_core_esp32" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32/tools/sdk/include/aquestalk" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32\cores\esp32" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32\variants\m5stack_core_esp32" "-IC:\Users\kishima\Documents\Arduino\libraries\M5Stack\src" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32\libraries\Wire\src" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32\libraries\SPI\src" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32\libraries\FS\src" "-IC:\Users\kishima\Documents\Arduino\hardware\espressif\esp32\libraries\SD\src" "-IC:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src" "C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp" -o "C:\Users\kishima\AppData\Local\Temp\arduino_build_532064\libraries\m5stack-avatar\Avatar.cpp.o"
In file included from C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp:4:0:
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.h: In constructor 'm5avatar::Avatar::Avatar(m5avatar::Face*)':
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.h:21:10: error: 'm5avatar::Avatar::_isDrawing' will be initialized after [-Werror=reorder]
bool _isDrawing;
^
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.h:14:16: error: 'm5avatar::Expression m5avatar::Avatar::expression' [-Werror=reorder]
Expression expression;
^
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp:81:1: error: when initialized here [-Werror=reorder]
Avatar::Avatar(Face *face)
^
In file included from C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp:4:0:
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.h:20:11: error: 'm5avatar::Avatar::breath' will be initialized after [-Werror=reorder]
float breath;
^
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.h:15:11: error: 'float m5avatar::Avatar::eyeOpenRatio' [-Werror=reorder]
float eyeOpenRatio;
^
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp:81:1: error: when initialized here [-Werror=reorder]
Avatar::Avatar(Face *face)
^
In file included from C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp:4:0:
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.h:23:17: error: 'm5avatar::Avatar::speechText' will be initialized after [-Werror=reorder]
const char* speechText;
^
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.h:22:18: error: 'm5avatar::ColorPalette m5avatar::Avatar::palette' [-Werror=reorder]
ColorPalette palette;
^
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp:81:1: error: when initialized here [-Werror=reorder]
Avatar::Avatar(Face *face)
^
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp: In member function 'void m5avatar::Avatar::setGaze(float, float)':
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp:218:7: warning: unused variable 'v' [-Wunused-variable]
int v = floor(4 * vertical);
^
C:\Users\kishima\Documents\Arduino\libraries\m5stack-avatar\src\Avatar.cpp:219:7: warning: unused variable 'h' [-Wunused-variable]
int h = floor(4 * horizontal);
^
ししかわさんの環境だと起きないらしいので、何かの設定がずれてしまっているんだろうな、と思いますが、まだポイントが絞りきれず。
気になったところ
- exampleのディレクトリ構造は、talk/talk.ino のような形にしたほうが、IDEのスケッチ例から参照できるのでより良いかと
Recent Comments