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

Add mic grpc example #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

apntt
Copy link

@apntt apntt commented Jun 11, 2020

May I propose you to add this example in the repo, I think it would be easier to anyone to test vosk-server with gRPC directly with the microphone.

This example use Pyaudio to record microphone then use grpc send data to the server.

I know it's not much but if I can help you save some time. ;)

@nshmyrev
Copy link
Contributor

Thank you! The idea is great, but I think you need to cleanup the code a bit. You do not need audio_file_name argument of gen function for example. The sample rate also better take from the microphone itself instead of enforcing the sample rate which some system doesn't support (44100 is more widely supported I think). Also, you can add capability to specify the device index and print the list of available devices so the user will be able to find the right device. Wrong device is a source of problems usually.

@apntt
Copy link
Author

apntt commented Jun 12, 2020

ok I'll do the modifications :)

…of the selected input to configure the stream
@apntt
Copy link
Author

apntt commented Jun 12, 2020

I made some modifications and cleaning.
tell me if it's ok for you.

remark: PyAudio display some logs when initialised, not pretty but not blocking, do you want to not show those logs ? or it's ok for this example ?

@nshmyrev
Copy link
Contributor

nshmyrev commented Aug 24, 2022

@vadimdddd please update this request so we can merge it now. Lets move to sounddevice instead of pyaudio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants