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

Give client a Python interface #2

Open
multimeric opened this issue Dec 19, 2018 · 4 comments
Open

Give client a Python interface #2

multimeric opened this issue Dec 19, 2018 · 4 comments

Comments

@multimeric
Copy link

The sound detection and websocket streaming you've implemented is fantastic. However I'm interested in using the client in another Python application. Do you think we could look into cleaning it up and making it importable? The CLI should stay obviously, but ideally there'd be a single entry point function that could be called by some other Python code, or by the CLI/argparse interface.

I'll write a PR for this if you're interested (and once I get some time).

@daanzu
Copy link
Owner

daanzu commented Dec 20, 2018

Sure; good idea, and a PR would be great! Actually, I have some cleanup to commit for the client that might help, which I'll try to complete in a day or two.

@daanzu
Copy link
Owner

daanzu commented Dec 21, 2018

@TMiguelT Cleanup complete. Also refactored some to ease external usage.

@imKarthikeyanK
Copy link

if you could clearly describe about this issue, I will be very happy to become a contributor to this repo.

@multimeric
Copy link
Author

@daanzu, thanks for the cleanup!

I still believe there is some work that needs to be done though. The main thing this needs is the ability to import the client in another python package (@imkkk). For instance:

from deepspeech_websocket_server.client import Client

def callback(recognition):
    print(f"Recognised {recognition}")

Client().recognise(callback)

This would allow us to use the great VAD + DeepSpeech integration in another application, for example a custom web application.

I've slowly started looking into making a PR for this though, so don't stress if none of you get the chance to do this.

ezavesky added a commit to ezavesky/deepspeech-websocket-server that referenced this issue Sep 5, 2019
- add POST API for uploading a wav file
- add enhanced metadata output option to ws and POST options
- enhanced README with additional examples and changelog
- not complete fix, but partially aimed at issue daanzu#2 (request for package) with API addition
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

3 participants