p0n1 / epub_to_audiobook

EPUB to audiobook converter, optimized for Audiobookshelf
MIT License
888 stars 86 forks source link

Issue with Azure tts on certain chapters #72

Open sZale2 opened 5 days ago

sZale2 commented 5 days ago

Getting this error while using azure tts, but only for certain chapters, as in if I add --chapter_start(next chapter) it'll work fine from there. It keeps occurring on the same chapter even after rebooting the whole thing many times.

2024-06-28 15:03:13 [INFO] Sending request to Azure TTS, data length: 3986 2024-06-28 15:03:17 [WARNING] Error while converting text to speech (attempt 9): Response ended prematurely

The command I'm using is python main.py <file.epub> <output folder> --tts azure --language ja-JP --voice_name "ja-JP-NanamiNeural"

image

It doesn't seem to be an issue of size, it works on larger chapters, maybe an unusual string it can't process?

Using Windows 10 Pro x64.

Any Ideas what this might be?

sZale2 commented 5 days ago

If I run it in debug this is where it stops, not sure how to use this information though, can't tell what it's dying on. image

p0n1 commented 4 days ago

Hi @sZale2. Thanks for reporting. Never saw errors like this on my side. Looks like it was caused by some special characters. It would be best if I can get a sample file then I can fix this. Besides, you could update the code to the latest https://github.com/p0n1/epub_to_audiobook/releases/tag/v0.6.0 and try with --tts edge feature. I guess it could be working in that. Let me know if you have any results.