Update voice_create.py
Browse files- 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)
|