NeonBohdan commited on
Commit
7a2c904
1 Parent(s): b28fa4b

Added language dependent input

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -11,6 +11,14 @@ LANGUAGES = [
11
  "uk",
12
  ]
13
 
 
 
 
 
 
 
 
 
14
  title = "🐸💬 - NeonAI Coqui AI TTS Plugin"
15
  description = "🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production"
16
  info = "more info at [Neon Coqui TTS Plugin](https://github.com/NeonGeckoCom/neon-tts-plugin-coqui), [Coqui TTS](https://github.com/coqui-ai/TTS)"
@@ -56,6 +64,8 @@ with gr.Blocks() as blocks:
56
  [textbox, radio],
57
  [audio],
58
  )
 
 
59
 
60
 
61
  blocks.launch()
 
11
  "uk",
12
  ]
13
 
14
+ language_phrases = {
15
+ "en": "Hello, how are you?",
16
+ "pl": "Witam, jak się masz?",
17
+ "uk": "Привіт, як твої справи?",
18
+ }
19
+
20
+
21
+
22
  title = "🐸💬 - NeonAI Coqui AI TTS Plugin"
23
  description = "🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production"
24
  info = "more info at [Neon Coqui TTS Plugin](https://github.com/NeonGeckoCom/neon-tts-plugin-coqui), [Coqui TTS](https://github.com/coqui-ai/TTS)"
 
64
  [textbox, radio],
65
  [audio],
66
  )
67
+ radio.change(lambda lang: language_phrases[lang], radio, textbox)
68
+
69
 
70
 
71
  blocks.launch()