yosuke-i commited on
Commit
367a6ee
·
verified ·
1 Parent(s): a74ff25

Update voice_create.py

Browse files
Files changed (1) hide show
  1. voice_create.py +1 -0
voice_create.py CHANGED
@@ -38,6 +38,7 @@ def text_to_speech(input_file):
38
  print("テキスト",text)
39
  # テキスト内の改行を1sの間に変換
40
  text = text.replace("\n", '<break time="1s"/>')
 
41
  ssml_parts.append(f'<voice name="{voice_name}"><prosody rate="{row["speed"]}"><p>{text}</p></prosody></voice>')
42
  print(ssml_parts)
43
  ssml = '<speak>' + ''.join(ssml_parts)
 
38
  print("テキスト",text)
39
  # テキスト内の改行を1sの間に変換
40
  text = text.replace("\n", '<break time="1s"/>')
41
+ text = text.replace(".", '.<break time="500ms"/>')
42
  ssml_parts.append(f'<voice name="{voice_name}"><prosody rate="{row["speed"]}"><p>{text}</p></prosody></voice>')
43
  print(ssml_parts)
44
  ssml = '<speak>' + ''.join(ssml_parts)