Leo Liu commited on
Commit
08832c1
·
verified ·
1 Parent(s): 29a5fc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -14
app.py CHANGED
@@ -17,20 +17,8 @@ def text2story(text):
17
 
18
  # text2audio
19
  def text2audio(story_text):
20
- pipe = pipeline(
21
- "text-to-audio",
22
- model = "facebook/mms-tts-eng",
23
- speaker = "en_female",
24
- )
25
- audio_data = pipe(
26
- story_text,
27
- generate_kwargs={
28
- "tempo":1.1, # 稍快的语速(1.0为基准)
29
- "pitch":4, # 提高音调(0-10范围)
30
- "energy":1.2, # 增强表现力
31
- "vocal_tract_length":1.15 # 更明亮的音色
32
- }
33
- )
34
  return audio_data
35
 
36
 
 
17
 
18
  # text2audio
19
  def text2audio(story_text):
20
+ pipe = pipeline("text-to-audio", model="facebook/mms-tts-eng")
21
+ audio_data = pipe(story_text)
 
 
 
 
 
 
 
 
 
 
 
 
22
  return audio_data
23
 
24