Upload folder using huggingface_hub
Browse files- tts_gradio.py +6 -2
tts_gradio.py
CHANGED
@@ -5,7 +5,7 @@ warnings.filterwarnings("ignore")
|
|
5 |
import re
|
6 |
import requests
|
7 |
import argparse
|
8 |
-
import
|
9 |
import os
|
10 |
import re
|
11 |
import tempfile
|
@@ -221,7 +221,11 @@ def microsoft(text, name, style="Neural"):
|
|
221 |
data=data,
|
222 |
)
|
223 |
# breakpoint()
|
224 |
-
|
|
|
|
|
|
|
|
|
225 |
|
226 |
if __name__ == '__main__':
|
227 |
parser = argparse.ArgumentParser()
|
|
|
5 |
import re
|
6 |
import requests
|
7 |
import argparse
|
8 |
+
import time
|
9 |
import os
|
10 |
import re
|
11 |
import tempfile
|
|
|
221 |
data=data,
|
222 |
)
|
223 |
# breakpoint()
|
224 |
+
timestamp = int(time.time()*10000)
|
225 |
+
path = f'/tmp/output_{timestamp}.wav'
|
226 |
+
with open(path, 'wb') as f:
|
227 |
+
f.write(response.content)
|
228 |
+
return "Success", path
|
229 |
|
230 |
if __name__ == '__main__':
|
231 |
parser = argparse.ArgumentParser()
|