Replace Android system TTS engine (#508)

This commit is contained in:
Fangjun Kuang
2023-12-31 23:02:35 +08:00
committed by GitHub
parent e475e750ac
commit d7e10bb3f8
57 changed files with 1488 additions and 0 deletions

View File

@@ -56,6 +56,8 @@ class OfflineTts(
fun sampleRate() = getSampleRate(ptr)
fun numSpeakers() = getNumSpeakers(ptr)
fun generate(
text: String,
sid: Int = 0,
@@ -113,6 +115,7 @@ class OfflineTts(
private external fun delete(ptr: Long)
private external fun getSampleRate(ptr: Long): Int
private external fun getNumSpeakers(ptr: Long): Int
// The returned array has two entries:
// - the first entry is an 1-D float array containing audio samples.