Common-voice: Suggestion: Share embedded code

Created on 2 Dec 2017  路  6Comments  路  Source: mozilla/common-voice

Hi all, with a friend we released this project and we were thinking, if the user has 100% accuracy, about showing a popup asking to contribute here, or directly to speak, but I couldn't find anything related in the website. I think it would be really helpful to spread the word about the project.

Thanks!

Most helpful comment

Very interesting! We actually already do have an api, just not documented. We would help you get that integrated.

The other approach I could see from above is allowing Common Voice to be opened in an iFrame, with the sentence to be spoken encoded in the url.

All 6 comments

We're up for adding integration. What exactly would you need to make this happen?

Well, we were thinking that there are 3 options:

  1. Just a pop up to embed in our site, asking the user to contribute here.
  2. Directly a pop up letting the user record it's voice there.
  3. An API so we can send you the audio recorded by the users of our app if they allow to.

Any of them would be okay for us. What do you think?

Very interesting! We actually already do have an api, just not documented. We would help you get that integrated.

The other approach I could see from above is allowing Common Voice to be opened in an iFrame, with the sentence to be spoken encoded in the url.

Hi Mike, glad to see your answer, I'll be working with @Woile in the API integration.

Could you bring us more detail about how the API works? It will be great if you can point us in the right direction.

So far this is our plan:

  • Let the user read something
  • If the speech result is pretty good or excellent, the app will ask him if he wants to send the recorded audio to the mozilla voice-web project. (the audio will be removed if he doesn't approve it)
  • If the user accepts the app will send the audio through the API. We can also ask to him required user profile data if it's needed.

So, we think we can send via the API the recorded audio and some user profile information.

Does it make sense? What do you think?

you can find code for how common voice does this here:
https://github.com/mozilla/voice-web/blob/master/web/src/services/api.ts#L189

more generally speaking, you can send a POST request to: voice.mozilla.org/upload/
with the sentence text, and some user identifier in the headers,
and a binary blog representing the soundfile in the body of the request

Given that the API is not official and could change any time (and probably did in the mean time), I'd say a link to voice.mozilla.org would be great. As far as I know there are no definitive plans to support an official API (yet?), so I'm closing this.

Was this page helpful?
0 / 5 - 0 ratings