Leo Liu commited on
Commit
07e8d9e
·
verified ·
1 Parent(s): 2ce596e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -17,19 +17,8 @@ def text2story(text):
17
 
18
  # text2audio
19
  def text2audio(story_text):
20
- pipe = pipeline(
21
- "text-to-speech",
22
- model="Matthijs/speecht5-tts",
23
- speaker_id=1086
24
- )
25
- audio_data = pipe(
26
- story_text,
27
- forward_params={
28
- "speaker_embeddings": pipe.model.speaker_manager.speaker_ids[1086],
29
- "pitch": 5.0,
30
- "speed": 0.85
31
- }
32
- )
33
  return audio_data
34
 
35
 
 
17
 
18
  # text2audio
19
  def text2audio(story_text):
20
+ pipe = pipeline("text-to-audio", model="facebook/musicgen-small")
21
+ audio_data = pipe(story_text)
 
 
 
 
 
 
 
 
 
 
 
22
  return audio_data
23
 
24