Unable to compile flite example

Jalakamkiran
Posts: 5
Joined: Fri Mar 26, 2021 7:18 am

Unable to compile flite example

Postby Jalakamkiran » Fri Apr 09, 2021 6:23 am

Hey guys, I am trying acheive Text to speech using flite which seems to be a open source library for speech synthesis.
I found a repo with the flite for esp32. From the read me alkimey has made it on ESP IDF v3.2.2.
https://github.com/alkhimey/esp32-flite

The problem I am using ESP IDF v4.4 and I am not able to get it complied.

Code: Select all

../main/main.c:18:10: fatal error: flite.h: No such file or directory
 #include "flite.h"
          ^~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Now, when I create the CMakelist file in the components folder(The v3.2.2 doesn't have them I assume) and add the directory by specifying

Code: Select all

idf_component_register(
                    INCLUDE_DIRS "flite/include")
Then I am getting the error

Code: Select all

/home/jalakamkiran/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(main.c.obj): in function `synth_task':
/home/jalakamkiran/esp/esp-idf/examples/esp32-flite/build/../main/main.c:290: undefined reference to `flite_init'
/home/jalakamkiran/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/jalakamkiran/esp/esp-idf/examples/esp32-flite/build/../main/main.c:293: undefined reference to `register_cmu_us_kal'
/home/jalakamkiran/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/jalakamkiran/esp/esp-idf/examples/esp32-flite/build/../main/main.c:297: undefined reference to `cst_safe_alloc'
/home/jalakamkiran/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/jalakamkiran/esp/esp-idf/examples/esp32-flite/build/../main/main.c:303: undefined reference to `audio_streaming_info_val'
/home/jalakamkiran/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/jalakamkiran/esp/esp-idf/examples/esp32-flite/build/../main/main.c:306: undefined reference to `feat_set'
/home/jalakamkiran/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/jalakamkiran/esp/esp-idf/examples/esp32-flite/build/../main/main.c:316: undefined reference to `flite_text_to_wave'
/home/jalakamkiran/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/jalakamkiran/esp/esp-idf/examples/esp32-flite/build/../main/main.c:316: undefined reference to `delete_wave'


I am not able to understand what I should do to get this complied and running. Please guide me through for this or point me out the mistake I am making.

Here is the file tree I am seeing the components directory

esp32-flite
->components
--> CMakeLists.txt
--> cmulx(dir)
-->cmu_us_kal(dir)
-->flite(dir)
-->usenglish(dir)
(Here dir is directory)
Thanks

ujurmsde
Posts: 38
Joined: Tue Jan 19, 2021 6:37 am

Re: Unable to compile flite example

Postby ujurmsde » Sat Apr 10, 2021 2:56 am

As far as I could undestand from the first look is that there are "Undefined reference", so make sure that both .h and .c/.cpp files exists which make is able to find while building the project.!

Who is online

Users browsing this forum: Bing [Bot], nopnop2002 and 81 guests