diff --git a/src/rspeech/gcloud.py b/src/rspeech/gcloud.py index aabfb60..38def7a 100644 --- a/src/rspeech/gcloud.py +++ b/src/rspeech/gcloud.py @@ -40,6 +40,9 @@ import google.oauth2.credentials import uuid import pathlib from rspeech.play import play_audio_async +import logging + +logger = logging.getLogger(__name__) # Chars to be ignored in speech IGNORE_CHARS = ["*", "#", "`","'",'"',"\\","/","---"] @@ -105,7 +108,8 @@ async def tts(text:str ,google_project:str="lisa-448004", language_code:str="nl- with file.open("wb") as audio_file: audio_file.write(base64.b64decode(audio_content.encode('latin1'))) async for tik in play_audio_async(file): - await asyncio.sleep(0.1) + logger.debug(tik) + await asyncio.sleep(1) file.unlink()