Closed ItriOne closed 1 year ago
Hi @ItriOne, thanks for the message, and thanks for using the SDK! We're looking into this bug and will get back to as soon as we have an answer. Just so you're aware I lightly edited your comment to make sure all the code snippets were correctly placed in code snippet blocks
@ItriOne, I've just copied the code snippets you provided and was not able to replicate the issue. I do have a couple of suggestions that you might want to follow up on:
ws.run
function rather than ws.run_synchronously
- run_synchronously wraps a call to ws.run
in a asyncio.run(asyncio.wait_for()).], which are the kinds of function calls that can create issues in Jupyter.If neither of those suggestions help, then maybe you could share a few more details about your system so we can help debug, like python version, operating system, whether you're calling this from within some other piece of code and if so what that code might be.
Hopefully, that's enough to help you fix your issue, and as I said above, if it's still a problem, tell us and we can take another look
This issue is over 2 months old so I'm going to close it, we can reopen if there's any further need for dicussion
Describe the bug
File D:\Python\Spyder\pkgs\spyder_kernels\py3compat.py:356 in compat_exec exec(code, globals, locals)
File d:\workspace\soundtranscribe\speechrecognition.py:99 ws.run_synchronously(file, conf, settings)
File D:\Python\Spyder\Python\lib\site-packages\speechmatics\client.py:505 in run_synchronously asyncio.run(asyncio.wait_for(self.run(*args, **kwargs), timeout=timeout))
File asyncio\runners.py:33 in run
RuntimeError: asyncio.run() cannot be called from a running event loop
To Reproduce
Create a transcription client
Define an event handler to print the partial transcript
Define an event handler to print the full transcript
Register the event handler for partial transcript
Register the event handler for full transcript
Define transcription parameters
Expected behavior A clear and concise description of what you expected to happen.
Screenshots/Logs If applicable, add screenshots or logs to help explain your problem.
Additional context Add any other context about the problem here.