tts even when autodetect; source language transliteration (closes #23)
All checks were successful
mozhi pipeline / Push Docker image to Codeberg docker registry (push) Successful in 30m22s
mozhi pipeline / Build and publish artifacts (push) Successful in 59m9s

This commit is contained in:
2023-12-04 19:17:19 +05:30
parent b8c7be7a96
commit 8cfae44371
5 changed files with 24 additions and 31 deletions

View File

@@ -63,9 +63,8 @@ func HandleIndex(c *fiber.Ctx) error {
translationExists = true
}
if engine == "google" || engine == "reverso" {
if from == "auto" {
//ttsFrom = "/api/tts?lang="+translation.AutoDetect+"&engine="+engine+"&text="+originalText
ttsFrom = ""
if from == "auto" && translation.AutoDetect != "" {
ttsFrom = "/api/tts?lang=" + translation.AutoDetect + "&engine=" + engine + "&text=" + originalText
} else {
ttsFrom = "/api/tts?lang=" + from + "&engine=" + engine + "&text=" + originalText
}