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 new provider: wit.ai #169

Open
yshalsager opened this issue Apr 6, 2021 · 4 comments
Open

Add new provider: wit.ai #169

yshalsager opened this issue Apr 6, 2021 · 4 comments

Comments

@yshalsager
Copy link

yshalsager commented Apr 6, 2021

I would like to suggest adding wit.ai API as a new Speech-to-Text engine.
It's a very solid and open-source natural language processing API. https://github.com/wit-ai

I might be able to add it and send a PR if I managed to have some free time after the idea is accepted of course.

Here's an API implementation example I wrote for another project
https://github.com/yshalsager/Userge-Plugins/blob/98feca02f75ec2fa18cb49255577af85761d0c37/plugins/transcribe.py#L18

@yshalsager
Copy link
Author

@BingLingGroup I have started working on it and finished an initial implementation that works.
https://github.com/yshalsager/autosub/commits/witai

However, before I make a pull request I'd like to ask about a point. WIT API accepts audio input as wav, mpeg3, ogg, and raw pcm. For the rate, it should be 8000. I managed to get it to work by defining these options as cli arguments -i test.m4a -S ar-eg -sapi witai -skey xxxxx -asf .pcm -asr 8000 but I believe there should be a way to make this audio configuration autosub's default for WIT speech engine, wouldn't it be better?

@BingLingGroup
Copy link
Owner

I'm not sure about the accuracy of this api. So I guess it's better not to change the default api especially when it needs to sign up and get the token to use.

@yshalsager
Copy link
Author

@BingLingGroup I didn't mean to change the default API. I meant, is there a way provided by autosub code to set default settings of a speech engine?

@BingLingGroup
Copy link
Owner

Sorry I misunderstood.
I set the defaut audio settings here and here. Perhaps it's better to set the constaints in https://github.com/BingLingGroup/autosub/blob/dev/autosub/constants.py.

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

No branches or pull requests

2 participants