Skip to content

Commit 91b7c43

Browse files
csenetclaude
andcommitted
Replace line breaks with Japanese periods in TTS messages
- Add line break handling in text_check function to convert \n to 。 - Improves TTS readability for multi-line messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 4653121 commit 91b7c43

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ async def text_check(text: str, user_name: str) -> tuple[str, str]:
243243
text = replaceStamp(text)
244244
if mention.search(text):
245245
text = await replaceUserName(text)
246-
246+
247+
# 改行を句点に置き換え
248+
text = text.replace('\n', '。')
247249
text = re.sub('http.*', '', text)
248250
text = replaceDict(text)
249251
text = user_name + text

0 commit comments

Comments
 (0)