javajakarta-eespeech-to-texttranscription

how to get the transcript text from speechMatics


I am working on a java transcript video app and I've used speechMatics to transcript my video. How do I get the transcripted text from speechMatics?


Solution

  • From what I can tell you have already used a POST to upload your video, so now simply use a GET request to download it.

    Please refer to the API: https://app.speechmatics.com/api-details

    Specifically the section on getting a transcript that shows how you need to form the GET request: https://app.speechmatics.com/api-details#getTranscript

    GET transcript file for a particular transcription job.

    curl "https://api.speechmatics.com/v1.0/user/$MY_API_USER_ID/jobs/$MY_JOB_ID/transcript?auth_token=$MY_API_AUTH_TOKEN"
    

    The above will return a JSON file of your transcript, but you can also get a plain text file by adding format=txt to your request like so:

    curl "https://api.speechmatics.com/v1.0/user/$MY_API_USER_ID/jobs/$MY_JOB_ID/transcript?format=txt&auth_token=$MY_API_AUTH_TOKEN"
    

    You obviously need an API_User and a JOB_ID, but these can be obtained when you upload the video, or if you do not know the JOB_ID then you can get a list of all jobs and find the key you need from the list:

    curl "https://api.speechmatics.com/v1.0/user/$MY_API_USER_ID/jobs/?auth_token=$MY_API_AUTH_TOKEN"