Skip to content

I'm lazy, and don't want to pay google... so I'll make my own API for Speech Recognition :/

Notifications You must be signed in to change notification settings

IsaiahSama/SpeechToTextAPI

Repository files navigation

SpeechToTextAPI

This is an API that will accept an audio file, transcribe it, and then return the transcription.

Transcriptions are done using the speech_recognition library, making use of the google_speech API.

Endpoints

/transcribe/ - POST

/transcribe/

This endpoint is a POST only. This endpoint expects JSON to be sent in the following format:

{
    method: "POST",
    body: formData,
    headers: {
        "Content-Type": "multipart/form-data",
    },
}

Where formData contains the audio file to be transcribed under the key 'audio'.

For Example:

const formData = new FormData();
formData.append("audio", file);

Will explain the endpoint later, when I figure out everything else. I figured everything else out for the most part, but I'm still not good enough with javascript to explain it! You can refer to this application in the "Record.js" file, to see an example though.

About

I'm lazy, and don't want to pay google... so I'll make my own API for Speech Recognition :/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages