kopia lustrzana https://codeberg.org/pluja/openai-telegram-bot
remove newlines from text so it is read as a single sentence
rodzic
aea6002d62
commit
62d1aef168
3
main.py
3
main.py
|
@ -129,6 +129,9 @@ async def text_to_voice(text: str, language: str = None) -> BytesIO:
|
||||||
text=True,
|
text=True,
|
||||||
encoding="utf8",
|
encoding="utf8",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Remove all newlines from the text so that the text is read as a single sentence
|
||||||
|
text = text.replace("\n", ". ")
|
||||||
process.communicate(input=text)
|
process.communicate(input=text)
|
||||||
|
|
||||||
# Open the file in binary mode and read its content into BytesIO object
|
# Open the file in binary mode and read its content into BytesIO object
|
||||||
|
|
Ładowanie…
Reference in New Issue