Update voice_create.py
Browse files- voice_create.py +2 -1
voice_create.py
CHANGED
|
@@ -35,8 +35,9 @@ def text_to_speech(input_file):
|
|
| 35 |
# テキスト内の改行を1sの間に変換
|
| 36 |
text = text.replace("\n", '<break time="1s"/>')
|
| 37 |
ssml_parts.append(f'<voice name="{voice_name}"><prosody rate="{row["speed"]}"><p>{text}</p></prosody></voice>')
|
| 38 |
-
|
| 39 |
ssml = '<speak>' + ''.join(ssml_parts)
|
|
|
|
| 40 |
|
| 41 |
if pd.notna(row.get('question')) and row['question'] != '':
|
| 42 |
ssml += f'<break time="1s"/><voice name="{row["voiceQuestion"]}"><prosody rate="{row["speed"]}"><p>Question</p><break time="1s"/><p>{row["question"]}</p></prosody></voice>'
|
|
|
|
| 35 |
# テキスト内の改行を1sの間に変換
|
| 36 |
text = text.replace("\n", '<break time="1s"/>')
|
| 37 |
ssml_parts.append(f'<voice name="{voice_name}"><prosody rate="{row["speed"]}"><p>{text}</p></prosody></voice>')
|
| 38 |
+
print(ssml_parts)
|
| 39 |
ssml = '<speak>' + ''.join(ssml_parts)
|
| 40 |
+
print(ssml)
|
| 41 |
|
| 42 |
if pd.notna(row.get('question')) and row['question'] != '':
|
| 43 |
ssml += f'<break time="1s"/><voice name="{row["voiceQuestion"]}"><prosody rate="{row["speed"]}"><p>Question</p><break time="1s"/><p>{row["question"]}</p></prosody></voice>'
|