Fix CI errors. (#993)
This commit is contained in:
7
.github/workflows/flutter-linux.yaml
vendored
7
.github/workflows/flutter-linux.yaml
vendored
@@ -89,18 +89,13 @@ jobs:
|
|||||||
|
|
||||||
flutter --version
|
flutter --version
|
||||||
|
|
||||||
mkdir -p /__t/flutter-Linux-3.22.1-X64/flutter
|
git config --global --add safe.directory /__t/flutter-Linux-*/flutter || true
|
||||||
|
|
||||||
git config --global --add safe.directory /__t/flutter-Linux-3.22.1-X64/flutter
|
|
||||||
|
|
||||||
flutter --version
|
flutter --version
|
||||||
|
|
||||||
dart --version
|
dart --version
|
||||||
flutter doctor
|
flutter doctor
|
||||||
|
|
||||||
|
|
||||||
flutter doctor
|
|
||||||
|
|
||||||
- name: Install libgtk-3-dev
|
- name: Install libgtk-3-dev
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -2,11 +2,9 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
|||||||
|
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum OS X deployment version. Used only for macOS")
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum OS X deployment version. Used only for macOS")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
project(sherpa-onnx)
|
project(sherpa-onnx)
|
||||||
|
|
||||||
set(SHERPA_ONNX_VERSION "1.9.27")
|
set(SHERPA_ONNX_VERSION "1.9.28")
|
||||||
|
|
||||||
# Disable warning about
|
# Disable warning about
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ fun getSampleText(lang: String): String {
|
|||||||
text = "Aquest és un motor de text a veu que utilitza Kaldi de nova generació"
|
text = "Aquest és un motor de text a veu que utilitza Kaldi de nova generació"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"cym" -> {
|
||||||
|
text = "Peiriant testun-i-lais yw hwn sy'n defnyddio Kaldi'r genhedlaeth nesaf"
|
||||||
|
}
|
||||||
|
|
||||||
"ces" -> {
|
"ces" -> {
|
||||||
text = "Toto je převodník textu na řeč využívající novou generaci kaldi"
|
text = "Toto je převodník textu na řeč využívající novou generaci kaldi"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ class MainActivity : ComponentActivity() {
|
|||||||
TtsEngine.speakerId = 0
|
TtsEngine.speakerId = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
preferenceHelper.setSid(TtsEngine.speakerId)
|
||||||
},
|
},
|
||||||
label = {
|
label = {
|
||||||
Text("Speaker ID: (0-${numSpeakers - 1})")
|
Text("Speaker ID: (0-${numSpeakers - 1})")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ class PreferenceHelper(context: Context) {
|
|||||||
|
|
||||||
private val PREFS_NAME = "com.k2fsa.sherpa.onnx.tts.engine"
|
private val PREFS_NAME = "com.k2fsa.sherpa.onnx.tts.engine"
|
||||||
private val SPEED_KEY = "speed"
|
private val SPEED_KEY = "speed"
|
||||||
|
private val SID_KEY = "speaker_id"
|
||||||
|
|
||||||
private val sharedPreferences: SharedPreferences =
|
private val sharedPreferences: SharedPreferences =
|
||||||
context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE)
|
||||||
@@ -18,4 +19,14 @@ class PreferenceHelper(context: Context) {
|
|||||||
fun getSpeed(): Float {
|
fun getSpeed(): Float {
|
||||||
return sharedPreferences.getFloat(SPEED_KEY, 1.0f)
|
return sharedPreferences.getFloat(SPEED_KEY, 1.0f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setSid(value: Int) {
|
||||||
|
val editor = sharedPreferences.edit()
|
||||||
|
editor.putInt(SID_KEY, value)
|
||||||
|
editor.apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getSid(): Int {
|
||||||
|
return sharedPreferences.getInt(SID_KEY, 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -138,6 +138,7 @@ object TtsEngine {
|
|||||||
)
|
)
|
||||||
|
|
||||||
speed = PreferenceHelper(context).getSpeed()
|
speed = PreferenceHelper(context).getSpeed()
|
||||||
|
speakerId = PreferenceHelper(context).getSid()
|
||||||
|
|
||||||
tts = OfflineTts(assetManager = assets, config = config)
|
tts = OfflineTts(assetManager = assets, config = config)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ mkdir -p $dir
|
|||||||
cd $dir
|
cd $dir
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=./install \
|
-DCMAKE_INSTALL_PREFIX=./install \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
|||||||
Reference in New Issue
Block a user