fix:added sanitizing check on the log message (#272)

* fix:added sanitizing check on the log message

* fix: reformat the codes
This commit is contained in:
Willem Jiang
2025-06-03 11:50:54 +08:00
committed by GitHub
parent db3e74629f
commit 45568ca95b
2 changed files with 4 additions and 2 deletions

View File

@@ -102,7 +102,8 @@ class VolcengineTTS:
}
try:
logger.debug(f"Sending TTS request for text: {text[:50]}...")
sanitized_text = text.replace("\r\n", "").replace("\n", "")
logger.debug(f"Sending TTS request for text: {sanitized_text[:50]}...")
response = requests.post(
self.api_url, json.dumps(request_json), headers=self.header
)