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

sometimes program crash without error #183

Closed
iorilu opened this issue Jan 26, 2024 · 1 comment
Closed

sometimes program crash without error #183

iorilu opened this issue Jan 26, 2024 · 1 comment

Comments

@iorilu
Copy link

iorilu commented Jan 26, 2024

hi , I used edge-tts for a while
mostly it's working well

but sometimes it will crash , without any error

I made some simple scripts to use this library, when crash , the python process just quit ,
so it's hard to find the reason, anyone knows about this ?

here is the code snippet
sine i use this in a sperate thread , so i get new event loop
the raason I use new loop , is because I will it in pyqt , and pyqt has it's own event loop

  try:
      loop = asyncio.new_event_loop()
      asyncio.set_event_loop(loop) 
      # this function will call edge-tts api
      task = make_audio_txt(txt_path, voice_name, audio_path,
                                voice_speed, voice_volume, voice_pitch)
      asyncio.get_event_loop().run_until_complete(task)
      return audio_path
  except Exception as e:
      logger.debug(str(e))
  finally:
      loop.close()
@rany2
Copy link
Owner

rany2 commented May 18, 2024

I can't help you without more information but I can assure you that there isn't some broad exception somewhere in edge-tts that would have silenced some issue. If you can show me make_audio_txt I might be able to help you.

@rany2 rany2 closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2024
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

2 participants