Skip to content

Commit

Permalink
working with download of German or English voice
Browse files Browse the repository at this point in the history
  • Loading branch information
woheller69 committed Jan 28, 2025
0 parents commit e59eaa3
Show file tree
Hide file tree
Showing 420 changed files with 6,513 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.iml
.gradle
/local.properties
./idea
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
67 changes: 67 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}

android {
namespace = "com.k2fsa.sherpa.onnx.tts.engine"
compileSdk = 34

defaultConfig {
applicationId = "org.woheller69.ttsengine"
minSdk = 29
targetSdk = 34
versionCode = 1
versionName = "1.0"

vectorDrawables {
useSupportLibrary = true
}

buildFeatures {
viewBinding = true
}
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.1"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

dependencies {

implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.activity:activity-compose:1.8.2")
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
83 changes: 83 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.SherpaOnnxTtsEngine">
<activity
android:name=".GetSampleText"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.speech.tts.engine.GET_SAMPLE_TEXT" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".CheckVoiceData"
android:exported="true">
<intent-filter>
<action android:name="android.speech.tts.engine.CHECK_TTS_DATA" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".InstallVoiceData"
android:exported="true">
<intent-filter>
<action android:name="android.speech.tts.engine.INSTALL_TTS_DATA" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<service
android:name=".TtsService"
android:enabled="true"
android:exported="true"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.TTS_SERVICE" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

<meta-data
android:name="android.speech.tts"
android:resource="@xml/tts_engine" />
</service>

<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.SherpaOnnxTtsEngine">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.speech.tts.engine.CONFIGURE_ENGINE" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".DownloadActivity"
android:theme="@style/Theme.SherpaOnnxTtsEngine"
android:screenOrientation="portrait"
android:exported="true">
</activity>
</application>

</manifest>
Empty file added app/src/main/assets/.gitkeep
Empty file.
Binary file added app/src/main/assets/espeak-ng-data/af_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/am_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/an_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ar_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/as_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/az_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ba_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/be_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/bg_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/bn_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/bpy_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/bs_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ca_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/chr_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/cmn_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/cs_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/cv_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/cy_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/da_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/de_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/el_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/en_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/eo_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/es_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/et_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/eu_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/fa_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/fi_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/fr_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ga_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/gd_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/gn_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/grc_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/gu_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/hak_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/haw_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/he_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/hi_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/hr_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ht_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/hu_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/hy_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ia_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/id_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/intonations
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/io_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/is_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/it_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ja_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/jbo_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ka_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/kk_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/kl_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/kn_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ko_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/kok_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ku_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/ky_dict
Binary file not shown.
Binary file added app/src/main/assets/espeak-ng-data/la_dict
Binary file not shown.
8 changes: 8 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/aav/vi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name Vietnamese (Northern)
language vi

words 1 2
pitch 95 175


tone 100 225 800 100 2000 50 5400 75 8000 200
9 changes: 9 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/aav/vi-VN-x-central
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name Vietnamese (Central)
language vi-vn-x-central
phonemes vi-hue
dictrules 1

words 1
pitch 82 118 //80 118
voicing 90 //18
flutter 20
9 changes: 9 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/aav/vi-VN-x-south
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name Vietnamese (Southern)
language vi-vn-x-south
phonemes vi-sgn
dictrules 2

words 1
pitch 82 118 //80 118
voicing 90 //18
flutter 20
4 changes: 4 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/eo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name Esperanto
language eo

apostrophe 2
2 changes: 2 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/ia
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name Interlingua
language ia
5 changes: 5 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/io
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name Ido
language io
phonemes eo
status testing

4 changes: 4 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/jbo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name Lojban
language jbo

speed 80 // speed adjustment, percentage
8 changes: 8 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/lfn
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name Lingua Franca Nova
language lfn

phonemes base2
l_unpronouncable 0
numbers 2 3

stressLength 150 140 180 180 0 0 200 200
5 changes: 5 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/piqd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name Klingon
language piqd
status testing
stressRule 3

7 changes: 7 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name Pyash
language py
maintainer Logan Streondj <[email protected]>
status testing

speed 80 // speed adjustment, percentage
stressRule 0
6 changes: 6 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/qdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name Lang Belta
language qdb

numbers 4 3

replace 1 t ?
4 changes: 4 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/qya
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name Quenya
language qya
stressRule 2
// rule=penultimate, with qya_rules for light penultimate syllables to move primary stress to the preceding (antepenultimate) syllable
4 changes: 4 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/art/sjn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name Sindarin
language sjn
stressRule 2
// rule=penultimate, with sjn_rules for light penultimate syllables to move primary stress to the preceding (antepenultimate) syllable
6 changes: 6 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/azc/nci
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name Nahuatl (Classical)
language nci

intonation 3
stressRule 2
stressLength 190 190 200 200 0 0 220 240
2 changes: 2 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/bat/lt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name Lithuanian
language lt
12 changes: 12 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/bat/ltg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name Latgalian
language ltg
maintainer Valdis Vitolins <[email protected]>
status testing
phonemes lv
dictionary lv
dictrules 2 // Setting for Latgalian pronunciation
words 0 2
pitch 64 118
tone 60 150 204 100 400 255 700 10 3000 255
stressAmp 12 10 8 8 0 0 15 16
stressLength 160 140 200 140 0 0 240 160
9 changes: 9 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/bat/lv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name Latvian
language lv
maintainer Valdis Vitolins <[email protected]>
status mature
words 0 2
pitch 67 123
tone 60 150 204 100 400 255 700 10 3000 255
stressAmp 11 8 11 9 0 0 14 12
stressLength 160 120 200 130 0 0 230 180
4 changes: 4 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/bnt/sw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name Swahili
language sw

status testing
4 changes: 4 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/bnt/tn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name Setswana
language tn

status testing
3 changes: 3 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/ccs/ka
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name Georgian
language ka
lowercaseSentence // A period followed by a lowercase letter is considered a sentence (mkhedruli)
4 changes: 4 additions & 0 deletions app/src/main/assets/espeak-ng-data/lang/cel/cy
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name Welsh
language cy

intonation 4
Loading

0 comments on commit e59eaa3

Please sign in to comment.