eswardivi commited on
Commit
3661e80
1 Parent(s): aa5b7e7

speakers changed

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -3,12 +3,19 @@ import spaces
3
  import os, torch, io
4
  import json
5
  os.system('python -m unidic download')
 
6
  # print("Make sure you've downloaded unidic (python -m unidic download) for this WebUI to work.")
7
  from melo.api import TTS
8
  import tempfile
9
  import wave
10
  from pydub import AudioSegment
11
 
 
 
 
 
 
 
12
  @spaces.GPU
13
  def synthesize(conversation_text, progress=gr.Progress()):
14
  speed=1.0
@@ -16,7 +23,7 @@ def synthesize(conversation_text, progress=gr.Progress()):
16
  models = {
17
  'EN': TTS(language='EN', device=device),
18
  }
19
- speakers = ['EN_NEWEST', 'EN-Default']
20
 
21
  combined_audio = AudioSegment.empty()
22
  conversation = json.loads(conversation_text)
@@ -36,6 +43,7 @@ def synthesize(conversation_text, progress=gr.Progress()):
36
 
37
 
38
  with gr.Blocks() as demo:
 
39
  gr.Markdown('# Turn Any Article into Podcast')
40
  gr.Markdown('## Easily convert articles from URLs into listenable audio Podcast.')
41
  with gr.Group():
 
3
  import os, torch, io
4
  import json
5
  os.system('python -m unidic download')
6
+ import httpx
7
  # print("Make sure you've downloaded unidic (python -m unidic download) for this WebUI to work.")
8
  from melo.api import TTS
9
  import tempfile
10
  import wave
11
  from pydub import AudioSegment
12
 
13
+ def fetch_text(url):
14
+ prefix_url = "https://r.jina.ai/"
15
+ url = prefix_url + url
16
+ response = httpx.get(url, timeout=60.0)
17
+ return response.text
18
+
19
  @spaces.GPU
20
  def synthesize(conversation_text, progress=gr.Progress()):
21
  speed=1.0
 
23
  models = {
24
  'EN': TTS(language='EN', device=device),
25
  }
26
+ speakers = ['EN-Default','EN-US']
27
 
28
  combined_audio = AudioSegment.empty()
29
  conversation = json.loads(conversation_text)
 
43
 
44
 
45
  with gr.Blocks() as demo:
46
+ gr.Markdown('# Not Ready to USE')
47
  gr.Markdown('# Turn Any Article into Podcast')
48
  gr.Markdown('## Easily convert articles from URLs into listenable audio Podcast.')
49
  with gr.Group():