T-PRO offers simplified interface for high quality online speech recognition for interactive applications as well as transcriptions of recorded files.
https://rexapi.tpro.rocks
exposes endpoints that you can use for managing client metadata, https://rexws.tpro.rocks
allows to send audio and retrieving speech recognition results.
This sample shows how simple it can be to get you up and running
- You authenticate and get a the user details, that includes, settings and the user token that will be used to do other calls.
- You create a socket.io connection to
https//rexws.tpro.rocks
with the token you received after login. - You create a dictation specifying
type: 'frontend'
, as opposed tobackend
meant to non-interactive applications. init
let's the server know that you are going to start sending audiostart
/stop
as many time as you want.stop
makes sure that the server retrieves the results as soon as possible, while if you are continuously recording it may wait a little before sending the result, maybe you are only breathing or thinking about what to say next.- As you say the audio you will receive events with the results of the speech recognition.
- You will receive previews, and eventually final results.
- The final corresponds to non-overlapping segments of your audio, while the preview is meant to give a low latency feedback about the ongoing utterance.