Csuarezg commited on
Commit
7a8ea90
1 Parent(s): 49ff584

levantando la app text2speech con gradio

Browse files
Files changed (2) hide show
  1. requirements.txt +90 -0
  2. text2speech.py +20 -0
requirements.txt ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.1.0
2
+ aiohttp==3.8.4
3
+ aiosignal==1.3.1
4
+ altair==4.2.2
5
+ anyio==3.6.2
6
+ async-timeout==4.0.2
7
+ attrs==22.2.0
8
+ certifi==2022.12.7
9
+ charset-normalizer==3.0.1
10
+ click==8.1.3
11
+ combo-lock==0.2.4
12
+ contourpy==1.0.7
13
+ cycler==0.11.0
14
+ entrypoints==0.4
15
+ fastapi==0.92.0
16
+ ffmpy==0.3.0
17
+ filelock==3.9.0
18
+ fonttools==4.38.0
19
+ frozenlist==1.3.3
20
+ fsspec==2023.1.0
21
+ gradio==3.19.0
22
+ gTTS==2.3.1
23
+ h11==0.14.0
24
+ httpcore==0.16.3
25
+ httpx==0.23.3
26
+ huggingface-hub==0.12.1
27
+ idna==3.4
28
+ importlib-resources==5.12.0
29
+ Jinja2==3.1.2
30
+ json-database==0.7.0
31
+ jsonschema==4.17.3
32
+ kiwisolver==1.4.4
33
+ kthread==0.2.3
34
+ langcodes==3.3.0
35
+ linkify-it-py==1.0.3
36
+ markdown-it-py==2.1.0
37
+ MarkupSafe==2.1.2
38
+ matplotlib==3.7.0
39
+ mdit-py-plugins==0.3.3
40
+ mdurl==0.1.2
41
+ memory-tempfile==2.2.3
42
+ multidict==6.0.4
43
+ mycroft-messagebus-client==0.10.1
44
+ neon-tts-plugin-coqui==0.7.2
45
+ numpy==1.24.2
46
+ nvidia-cublas-cu11==11.10.3.66
47
+ nvidia-cuda-nvrtc-cu11==11.7.99
48
+ nvidia-cuda-runtime-cu11==11.7.99
49
+ nvidia-cudnn-cu11==8.5.0.96
50
+ orjson==3.8.6
51
+ ovos-backend-client==0.0.6
52
+ ovos-config==0.0.5
53
+ ovos-plugin-manager==0.0.21
54
+ ovos-utils==0.0.27
55
+ packaging==23.0
56
+ pandas==1.5.3
57
+ pexpect==4.8.0
58
+ Pillow==9.4.0
59
+ pkgutil_resolve_name==1.3.10
60
+ psutil==5.9.4
61
+ ptyprocess==0.7.0
62
+ pycryptodome==3.17
63
+ pydantic==1.10.5
64
+ pydub==0.25.1
65
+ pyee==8.1.0
66
+ pyparsing==3.0.9
67
+ pyrsistent==0.19.3
68
+ pytesseract==0.3.10
69
+ python-dateutil==2.8.2
70
+ python-multipart==0.0.5
71
+ pytz==2022.7.1
72
+ PyYAML==5.4.1
73
+ quebra-frases==0.3.7
74
+ requests==2.28.2
75
+ rfc3986==1.5.0
76
+ six==1.16.0
77
+ sniffio==1.3.0
78
+ starlette==0.25.0
79
+ toolz==0.12.0
80
+ torch==1.13.1
81
+ tqdm==4.64.1
82
+ typing_extensions==4.5.0
83
+ uc-micro-py==1.0.1
84
+ urllib3==1.26.14
85
+ uvicorn==0.20.0
86
+ watchdog==2.2.1
87
+ websocket-client==1.5.1
88
+ websockets==10.4
89
+ yarl==1.8.2
90
+ zipp==3.14.0
text2speech.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import tempfile
2
+ import gradio as gr
3
+ import pytesseract
4
+ from gtts import gTTS
5
+
6
+ def text_to_speech(inputs):
7
+ text = inputs
8
+ speech = gTTS(text)
9
+ speech.save("prueba.mp3")
10
+ return "prueba.mp3", text
11
+
12
+
13
+ outputs = [gr.Audio(label="Output"), "text"]
14
+
15
+ demo = gr.Interface(fn=text_to_speech,
16
+ inputs="text",
17
+ outputs=outputs,
18
+ )
19
+
20
+ demo.launch()