Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoAudioReceived error? #78

Open
danield424 opened this issue Jul 25, 2024 · 0 comments
Open

NoAudioReceived error? #78

danield424 opened this issue Jul 25, 2024 · 0 comments

Comments

@danield424
Copy link

danield424 commented Jul 25, 2024

I'm getting this error on certain EPUBs, not sure if there's some issue I can fix with my epub:

Traceback (most recent call last):
  File "/Users/danield/epub_to_audiobook/main.py", line 147, in <module>
    main()
  File "/Users/danield/epub_to_audiobook/main.py", line 143, in main
    AudiobookGenerator(config).run()
  File "/Users/danield/epub_to_audiobook/audiobook_generator/core/audiobook_generator.py", line 101, in run
    tts_provider.text_to_speech(
  File "/Users/danield/epub_to_audiobook/audiobook_generator/tts_providers/edge_tts_provider.py", line 170, in text_to_speech
    asyncio.run(communicate.save(output_file))
  File "/Users/danield/miniconda3/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Users/danield/miniconda3/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/danield/miniconda3/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/danield/epub_to_audiobook/audiobook_generator/tts_providers/edge_tts_provider.py", line 114, in save
    await self.chunkify()
  File "/Users/danield/epub_to_audiobook/audiobook_generator/tts_providers/edge_tts_provider.py", line 74, in chunkify
    audio_bytes = await self.generate_audio(content)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/danield/epub_to_audiobook/audiobook_generator/tts_providers/edge_tts_provider.py", line 93, in generate_audio
    async for chunk in communicate.stream():
  File "/Users/danield/epub_to_audiobook/venv/lib/python3.11/site-packages/edge_tts/communicate.py", line 506, in stream
    async for message in self.__stream():
  File "/Users/danield/epub_to_audiobook/venv/lib/python3.11/site-packages/edge_tts/communicate.py", line 482, in __stream
    raise NoAudioReceived(
edge_tts.exceptions.NoAudioReceived: No audio was received. Please verify that your parameters are correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant