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

Microphone Package/Library Isn't Supported on Windows #425

Open
hasanshahid5678 opened this issue Jun 26, 2024 · 5 comments
Open

Microphone Package/Library Isn't Supported on Windows #425

hasanshahid5678 opened this issue Jun 26, 2024 · 5 comments

Comments

@hasanshahid5678
Copy link

hasanshahid5678 commented Jun 26, 2024

What is the current behavior?

I am trying to run the live streaming examples for async_http and async_microphone. It only prints 'Could not open socket:' and exits. I have also run synchronous code and it is running as expected.

Steps to reproduce

run python examples/streaming/async_http/main.py

Expected behavior

Could not open socket:

Please tell us about your environment

Windows 11, Python 3.11.5

Other information

@dvonthenen
Copy link
Contributor

Hi @hasanshahid5678

Unfortunately, the Microphone package is not supported on Windows:
https://github.com/deepgram/deepgram-python-sdk/tree/main/examples/streaming/microphone

It's on the list to look at and I believe it's mostly a configuration issue. Just need to dedicate time to it.

@dvonthenen dvonthenen changed the title Unable to run async_http and async_microphone Microphone Package/Library Isn't Supported on Windows Jun 28, 2024
@hasanshahid5678
Copy link
Author

And I was only able to run aync_http using wsl terminal.

@dvonthenen
Copy link
Contributor

Yes, all of the async examples include code specific to *nix operating systems to demonstrate exiting the application gracefully from a signal termination.If you remove that part of the example, they should run in windows.

All of the threaded examples don't require that OS dependent termination. If you can run the threaded clients, they can be using in async classes/functions/code and they also are also better for IO-performant applications like websocket.

@hasanshahid5678
Copy link
Author

If I want to send a message through web sockets to the web, can I still use threaded example. If yes, please tell me how because await websocket.send() can only be used under async functions

@dvonthenen
Copy link
Contributor

You can use both. If you want to use the async example, just remove the *nix specific signal handling.

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