Updating or adding a new Flite TTS?

Hi !

I’m updating Flite, a tts program on https://play.google.com/store/apps/details?id=net.shallowmallow.speech.tts.flite&hl=en .

I’m hoping to put it on f-droid.

There’s already on version on f-droid https://f-droid.org/en/packages/edu.cmu.cs.speech.tts.flite/
which hasn’t been updated for a few years.

So I have a few questions

1 Like

Yes, new different appid and name.

Iframe in what? The metadata can have a Donation button in F-Droid client, so users can go to that site yes.

Great. Will the updated version of Flite support German language?

Seems yes, it’s on Google Store description.
But there is no Spanish, Portuguese!

Yes there is some German.
For Spanish, there could be some really soon, for Portuguese , if you’re interested in Brazilian Portuguese , there is rhvoice GitHub - RHVoice/RHVoice: a free and open source speech synthesizer for Russian and other languages doing it

Great news! We’ve been sorely needing an open source TTS. No up-to-date ones exist, it’s one of the biggest floss problems.

Do you think we could get an ETA on this?

Been waiting a long time for a new tts engine. Good luck.

Thanks.

I have put the wrapper ( still have to put the modified Flite version)

once I clean the flite engine itself and put it on gitlab. What else do I need to do to have it on f-droid ?

I’m trying to write the metadata but it doesn’t work

Here’s it

License: MIT
SourceCode: https://gitlab.com/Consonne/flitewrapper
IssueTracker: https://gitlab.com/Consonne/flitewrapper/issues

RepoType: git
Repo: https://gitlab.com/Consonne/flitewrapper.git

Builds:
  - versionName: 0.0.7
    versionCode: 7
    commit: 3ed0641c1038f3ab04c2dbee32ec0168295988e3
    submodules : true
    prebuild:
      - sed -i '/FLITEDIR variable should be set/ c\FLITEDIR:=$(shell pwd)/flite'
        ./jni/Android.mk
      - sed -i "s/upc_spa_lex//g" flite/config/android_all.lv
      - sed -i "s/upc_spa_lang//g" flite/config/android_all.lv
      - sed -i "s/upc_spa_hts//g" flite/config/android_all.lv
      - sed -i "s/cmu_us_slt_hts//g" flite/config/android_all.lv
      - sed -i '/libflite_cmu_us_slt_hts.a/d' jni/Android.mk
      - sed -i '/cmu_us_slt_hts/d' jni/net_shallowmallow_speech_tts_flite_engine.cc
      - sed -i 's/armeabi armeabi-v7a x86 mips/ armeabi-v7a/g' jni/Application.mk
      - rm build.xml
      
    build:
      - echo $PWD
      - export FLITEDIR=$PWD/flite/
      - cd $FLITEDIR
      - ./configure --with-langvox=android_all --target="armeabiv7a-android"
      - make -j8
      - ./configure --with-langvox=android_all --target="armeabi-android"
      - make -j8
      - ./configure --with-langvox=android_all --target="x86-android"
      - make -j8
    gradle:
      - armv7a

AutoUpdateMode: None
UpdateCheckMode: Tags

Categories: 
  - Reading
AuthorEmail : association.consonne@gmail.com

Name: Flite
Donate: https://www.helloasso.com/associations/consonne/formulaires/1
Summary : A Text to Speech Engine
Description: |-
    Description of what the app does, starting on a new line. It should be as
    objective as possible and wrapped at 80 chars (except links and list
    items).

It doesn’t work.

  • I don’t understand why it looks for the x86 and armeabi libs when I only want arm7. ( I build them to make it happy but it doesn’t.
    It’s likes he doesn’t use my build.gradle. I thought it was because of my build.xml and the remnants of an ant installator. But I don’t know anymore

  • I have few error messages
    cst_string.c:77: error: undefined reference to ‘atof’
    cst_mlsa.c:242: error: undefined reference to ‘rand’

I know it has something to do with android-21
What is the relation between APP_PLATFORM, android:minSdkVersion and android:targetSdkVersion? - Stack Overflow and maybe I just need the library -lm

But when I compile by myself in my own cloned repository, it works without problems. Why so many differences ?

@TryingTo
Reformatted a bit:

Categories:
  - Reading
License: MIT
AuthorEmail: association.consonne@gmail.com
SourceCode: https://gitlab.com/Consonne/flitewrapper
IssueTracker: https://gitlab.com/Consonne/flitewrapper/issues
Donate: https://www.helloasso.com/associations/consonne/formulaires/1

Name: Flite

RepoType: git
Repo: https://gitlab.com/Consonne/flitewrapper.git

Builds:
  - versionName: 0.0.7
    versionCode: 7
    commit: 0b768c11527a0198f836771beee779f5c2dcfd76
    submodules: true
    gradle:
      - armv7a
    prebuild:
      - sed -i -e '/FLITEDIR variable should be set/ c\FLITEDIR:=$(shell pwd)/flite'
        -e '/libflite_cmu_us_slt_hts.a/d' -e 's/armeabi armeabi-v7a x86 mips/armeabi-v7a/g'
        jni/Application.mk
      - sed -i -e "s/upc_spa_lex//g" -e "s/upc_spa_lang//g" -e "s/upc_spa_hts//g"
        -e "s/cmu_us_slt_hts//g" flite/config/android_all.lv
      - sed -i -e '/cmu_us_slt_hts/d' jni/net_shallowmallow_speech_tts_flite_engine.cc
      - rm build.xml
    build:
      - echo $PWD
      - export FLITEDIR=$PWD/flite/
      - cd $FLITEDIR
      - ./configure --with-langvox=android_all --target="armeabiv7a-android"
      - make -j$(nproc)

AutoUpdateMode: None
UpdateCheckMode: Tags

…but fails with

HTS_pstream.o
/home/strech/android/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc    -I../../include -g -O2 -Wall -fpic -march=armv7-a -mfloat-abi=softfp -O3 -DANDROID --sysroot=/home/strech/android/android-ndk-r12b/platforms/android-21/arch-arm     -c HTS_sstream.c -o ../../build/armeabiv7a-android/obj/src/hts/HTS_sstream.o
/home/strech/android/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc    -I../../include -g -O2 -Wall -fpic -march=armv7-a -mfloat-abi=softfp -O3 -DANDROID --sysroot=/home/strech/android/android-ndk-r12b/platforms/android-21/arch-arm     -c HTS_vocoder.c -o ../../build/armeabiv7a-android/obj/src/hts/HTS_vocoder.o
HTS_vocoder.c:57:25: fatal error: bb_mlsacore.c: No such file or directory
 #include "bb_mlsacore.c"
                         ^
compilation terminated.
../../config/common_make_rules:105: recipe for target '../../build/armeabiv7a-android/obj/src/hts/HTS_vocoder.o' failed
make[2]: *** [../../build/armeabiv7a-android/obj/src/hts/HTS_vocoder.o] Error 1
make[2]: *** Waiting for unfinished jobs....
../config/common_make_rules:132: recipe for target '../build/armeabiv7a-android/obj/src/.make_build_dirs' failed
make[1]: *** [../build/armeabiv7a-android/obj/src/.make_build_dirs] Error 2
config/common_make_rules:132: recipe for target 'build/armeabiv7a-android/obj//.make_build_dirs' failed
make: *** [build/armeabiv7a-android/obj//.make_build_dirs] Error 2
==== detail end ====% 

What am I missing?

There is one bb_mlsacore.c in flite/src/filter

and a symlink to this file in flite/src/hts

Maybe it doesn’t work for everyone…

@Licaon_Kter

Okay I have updated all the repos soit’s now a real file so you shouldn’t have this problem.

The new commit number is 3ed0641c1038f3ab04c2dbee32ec0168295988e3

@Licaon_Kter
Did you try it again with the new commit ?

No, not yet… Will do asap

Are there any news concerning this? An open source TTS engine would be really nice… Don’t see any so far.

@epinez

I had the courage to look at it again and I think I resolved it :slight_smile: .
( In fact you need to compile android-21 for aarch64 and android-19 for the other architectures)
I have another problem now , so I can’t upload it today, but maybe this week.

1 Like

Ok seems to work. But there are a few things left.

Like how can I support multiple variants ?

Here’s an extract of my gradle

flavorDimensions “abi”

productFlavors {
fat {
dimension “abi”
ndk {
abiFilters “x86”, “armeabi-v7a”,“arm64-v8a”
versionCode = 0;
}
}
armv7a {
dimension “abi”
ndk {
abiFilter “armeabi-v7a”
versionCode = 100 + android.defaultConfig.versionCode;
}
}
x86 {
dimension “abi”
ndk {
abiFilter “x86”
versionCode = 300 + android.defaultConfig.versionCode;
}
}
arm64 {
dimension “abi”
ndk {
abiFilter “arm64-v8a”
versionCode = 200 + android.defaultConfig.versionCode;
}
}
}

I saw only one example of a program doing it fdroiddata/metadata/org.sufficientlysecure.viewer.yml at b7272f0f4475184aafdea393cdae3c1e736cd795 · f-droid/fdroiddata · GitHub , and it was using “splits” in the gradle. I don’t want to use splits because I need to add some other variants that don’t depents on the “abi”.

Sorry, unfortunately I don’t have expertise in Gradle… But if you need someone to test, you can count on me.

Hi !
I don’t understand how the gradle option work
License: MIT
SourceCode: Consonne / FliteWrapper · GitLab
IssueTracker: Issues · Consonne / FliteWrapper · GitLab

RepoType: git
Repo: https://gitlab.com/Consonne/flitewrapper.git

Builds:
  - versionName: 0.0.7
    versionCode: 7
    commit: c66ebbb6b32a841ba20d54d4af15dab42f098790
    submodules: true
    prebuild:
      - sed -i '/FLITEDIR variable should be set/ c\FLITEDIR:=$(shell pwd)/flite'
        ./jni/Android.mk
      - sed -i "s/upc_spa_lex//g" flite/config/android_all.lv
      - sed -i "s/upc_spa_lang//g" flite/config/android_all.lv
      - sed -i "s/upc_spa_hts//g" flite/config/android_all.lv
      - sed -i "s/cmu_us_slt_hts//g" flite/config/android_all.lv
      - sed -i '/libflite_cmu_us_slt_hts.a/d' jni/Android.mk
      - sed -i '/cmu_us_slt_hts/d' jni/net_shallowmallow_speech_tts_flite_engine.cc
      - sed -i 's/armeabi armeabi-v7a x86 mips/ armeabi-v7a/g' jni/Application.mk
      - sed -i -e '/versionCode =/c\versionCode = 7' build.gradle
      - rm build.xml
    build:
      - echo $PWD
      - export FLITEDIR=$PWD/flite/
      - cd $FLITEDIR
      - ./configure --with-langvox=android_all --target="armeabiv7a-android"
      - make -j8
      - ./configure --with-langvox=android_all --target="aarch64-android"
      - make -j8
      - ./configure --with-langvox=android_all --target="x86-android"
      - make -j8
    gradle:
      - armv7a
    ndk: r15c

AutoUpdateMode: None
UpdateCheckMode: Tags

Categories: 
  - Reading
AuthorEmail : association.consonne@gmail.com

Name: Flite
Donate: https://www.helloasso.com/associations/consonne/formulaires/1
Summary : A Text to Speech Engine
Description: |-
    Description of what the app does, starting on a new line. It should be as
    objective as possible and wrapped at 80 chars (except links and list
    items).

if I put “yes”
it says “Failed to find any output apks”
if I put “- armv7a” . I have an apk
with “armeabi-v7a” and “x86” libs
If I put
-armv7a
-x86
it says “Task ‘assembleArmv7aX86Release’ not found in root project ‘flitewrapper’. Some candidates are: ‘assembleArmv7aRelease’.”

Ideally I would like 3 apks for now, “arm64”, “armv7a”, “x86” ( then I"ll add "mips, “armeabi” , “x86-64”)

Metadata… output: option?
Also please run fdroid rewritemeta :wink:

output seems only to indicate 1 apk … :frowning: