owaski commited on
Commit
63a63e1
·
1 Parent(s): 42ce9be

add apt-get dependency in packages.txt

Browse files
Files changed (2) hide show
  1. app.py +14 -3
  2. packages.txt +3 -0
app.py CHANGED
@@ -35,9 +35,6 @@ os.system("wget https://lf3-nlp-opensource.bytetos.com/obj/nlp-opensource/emnlp2
35
 
36
 
37
  # load tts
38
- os.system("apt-get install espeak -y")
39
- os.system("apt-get install libportaudio2 -y")
40
-
41
  # os.system("git clone https://github.com/Kyubyong/g2pC.git")
42
  # os.system("cd g2pC; sed -i 's/pkuseg/spacy_pkuseg/g' setup.py; \
43
  # sed -i 's/import pkuseg/import spacy_pkuseg as pkuseg/g' g2pc/g2pc.py; \
@@ -55,6 +52,20 @@ os.chdir('./IMS-Toucan')
55
  tts = PortaSpeechInterface(device='cpu', tts_model_path='Meta')
56
  os.chdir(cwd)
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  # The predict function. audio, language and mic_audio are all parameters directly passed by gradio
59
  # which means they are user inputted. They are specified in gr.inputs[] block at the bottom. The
60
  # gr.outputs[] block will specify the output type.
 
35
 
36
 
37
  # load tts
 
 
 
38
  # os.system("git clone https://github.com/Kyubyong/g2pC.git")
39
  # os.system("cd g2pC; sed -i 's/pkuseg/spacy_pkuseg/g' setup.py; \
40
  # sed -i 's/import pkuseg/import spacy_pkuseg as pkuseg/g' g2pc/g2pc.py; \
 
52
  tts = PortaSpeechInterface(device='cpu', tts_model_path='Meta')
53
  os.chdir(cwd)
54
 
55
+ # azure tts
56
+ os.system("apt-get update")
57
+ os.system("apt-get install build-essential libssl-dev libasound2 wget -y")
58
+ os.system("add-apt-repository universe; \
59
+ apt-get install apt-transport-https -y; \
60
+ apt-get update -y; \
61
+ apt-get install dotnet-sdk-6.0 -y")
62
+ os.system("dotnet tool install --global Microsoft.CognitiveServices.Speech.CLI")
63
+ os.system("export PATH=\"$PATH:/home/user/.dotnet/tools\"")
64
+
65
+ os.system("spx config @key --set 2d1847f4151f4f94ae06d0b620533936")
66
+ os.system("spx config @region --set eastus")
67
+
68
+
69
  # The predict function. audio, language and mic_audio are all parameters directly passed by gradio
70
  # which means they are user inputted. They are specified in gr.inputs[] block at the bottom. The
71
  # gr.outputs[] block will specify the output type.
packages.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ espeak
2
+ libasound-dev
3
+ libportaudio2