Get the transcript for a transcription job
https://eu1.asr.api.speechmatics.com/v2/jobs/{jobid}/transcriptAuthentication
- bearerAuth
Authorization: Bearer <token>Your API key, or a temporary key (JWT).
Path parameters
jobidstringID of the job.
Query parameters
formatoptional"json-v2" | "txt" | "srt"The transcription format (by default the
json-v2format is returned).waitoptionalintegerNote: Only available on SaaS on Cloud. Number of seconds to block until the transcript is ready before responding. Capped server-side. Returns HTTP 200 with the transcript if it becomes ready within
wait; otherwise returns the usual HTTP 404, and you can retry to keep waiting. When omitted, a short default wait applies: currently 5 seconds, and it will increase. Treat the default as an unspecified short interval rather than a fixed duration. Passwait=0to respond immediately.
Responses
OK
formatstringSpeechmatics JSON transcript format version number.
jobJobInfoSummary information about an ASR job, to support identification and tracking.
created_atstring<date-time>The UTC date time the job was created.
data_namestringName of data file submitted for job.
durationinteger≥ 0The data file audio duration (in seconds).
idstringThe unique id assigned to the job.
trackingoptionalTrackingDatajob.tracking. titleoptionalstringThe title of the job.
job.tracking. referenceoptionalstringExternal system reference.
job.tracking. tagsoptionalstring[]job.tracking. detailsoptionalobjectCustomer-defined JSON structure.
metadataRecognitionMetadataSummary information about the output from an ASR job, comprising the job type and configuration parameters used when generating the output.
created_atstring<date-time>The UTC date time the transcription output was created.
typeJobType"transcription"transcription_configoptionalTranscriptionConfigmetadata.transcription_config. languagestringLanguage model to process the audio input, normally specified as an ISO language code
metadata.transcription_config. domainoptionalstringRequest a specialized model based on 'language' but optimized for a particular field, e.g. 'finance' or 'medical'.
metadata.transcription_config. output_localeoptionalstringLanguage locale to be used when generating the transcription output, normally specified as an ISO language code
metadata.transcription_config. modeloptionalModel"standard""enhanced""melia-1"Specific model to use in transcription (previously called operating point).
metadata.transcription_config. operating_pointoptionalOperatingPoint"standard""enhanced""melia-1"metadata.transcription_config. additional_vocaboptionalobject[]≤ 20000 itemsList of custom words or phrases that should be recognized. Alternative pronunciations can be specified to aid recognition.
metadata.transcription_config. additional_vocab[]. contentstringmetadata.transcription_config. additional_vocab[]. sounds_likeoptionalstring[]metadata.transcription_config. punctuation_overridesoptionalobjectControl punctuation settings.
metadata.transcription_config. punctuation_overrides. sensitivityoptionalnumber<float>≥ 0, ≤ 1Ranges between zero and one. Higher values will produce more punctuation. The default is 0.5.
metadata.transcription_config. punctuation_overrides. permitted_marksoptionalstring[]The punctuation marks which the client is prepared to accept in transcription output, or the special value 'all' (the default). Unsupported marks are ignored. This value is used to guide the transcription process.
metadata.transcription_config. diarizationoptional"none" | "speaker" | "channel"Specify whether speaker or channel labels are added to the transcript. The default is
none.- none: no speaker or channel labels are added.
- speaker: speaker attribution is performed based on acoustic matching; all input channels are mixed into a single stream for processing.
- channel: multiple input channels are processed individually and collated into a single transcript.
metadata.transcription_config. channel_diarization_labelsoptionalstring[]Transcript labels to use when using collating separate input channels.
metadata.transcription_config. enable_entitiesoptionalbooleanInclude additional 'entity' objects in the transcription results (e.g. dates, numbers) and their original spoken form. These entities are interleaved with other types of results. The concatenation of these words is represented as a single entity with the concatenated written form present in the 'content' field. The entities contain a 'spoken_form' field, which can be used in place of the corresponding 'word' type results, in case a spoken form is preferred to a written form. They also contain a 'written_form', which can be used instead of the entity, if you want a breakdown of the words without spaces. They can still contain non-breaking spaces and other special whitespace characters, as they are considered part of the word for the formatting output. In case of a written_form, the individual word times are estimated and might not be accurate if the order of the words in the written form does not correspond to the order they were actually spoken (such as 'one hundred million dollars' and '$100 million').
metadata.transcription_config. max_delay_modeoptional"fixed" | "flexible"Whether or not to enable flexible endpointing and allow the entity to continue to be spoken.
metadata.transcription_config. audio_filtering_configoptionalobjectConfiguration for limiting the transcription of quiet audio.
metadata.transcription_config. audio_filtering_config. volume_thresholdoptionalnumber<float>≥ 0, ≤ 100Controls the lower limit of audio volume at which speech and audio events will be transcribed. If the volume limit is very low, then most sound will be passed to the speech recognition engine. Higher numbers will cut out increasing amounts of sound.
metadata.transcription_config. transcript_filtering_configoptionalobjectConfiguration for applying filtering to the transcription
metadata.transcription_config. transcript_filtering_config. remove_disfluenciesoptionalbooleanIf true, words that are identified as disfluencies will be removed from the transcript. If false (default), they are tagged in the transcript as 'disfluency'.
metadata.transcription_config. transcript_filtering_config. replacementsoptionalobject[]An array of objects defining custom replacements. Each replacement contains a pair of strings: the text to find
fromand the text to replace it withto.metadata.transcription_config. transcript_filtering_config. replacements[]. fromstringmetadata.transcription_config. transcript_filtering_config. replacements[]. tostringmetadata.transcription_config. speaker_diarization_configoptionalobjectConfiguration for speaker diarization
metadata.transcription_config. speaker_diarization_config. prefer_current_speakeroptionalbooleanIf true, the algorithm will prefer to stay with the current active speaker if it is a close enough match, even if other speakers may be closer. This is useful for cases where we can flip incorrectly between similar speakers during a single speaker section.
metadata.transcription_config. speaker_diarization_config. speaker_sensitivityoptionalnumber<float>≥ 0, ≤ 1Controls how sensitive the algorithm is in terms of keeping similar speakers separate, as opposed to combining them into a single speaker. Higher values will typically lead to more speakers, as the degree of difference between speakers in order to allow them to remain distinct will be lower. A lower value for this parameter will conversely guide the algorithm towards being less sensitive in terms of retaining similar speakers, and as such may lead to fewer speakers overall. The default is 0.5.
metadata.transcription_config. speaker_diarization_config. get_speakersoptionalbooleanIf true, speaker identifiers will be returned at the end of transcript.
metadata.transcription_config. speaker_diarization_config. speakersoptionalSpeakersInputItem[]Use this option to provide speaker labels linked to their speaker identifiers. When passed, the transcription system will tag spoken words in the transcript with the provided speaker labels whenever any of the specified speakers is detected in the audio. A maximum of 50 speakers identifiers across all speakers can be provided.
metadata.transcription_config. speaker_diarization_config. speakers[]. labelstring≥ 1 charactersSpeaker label, which must not match the format used internally (e.g. S1, S2, etc)
metadata.transcription_config. speaker_diarization_config. speakers[]. speaker_identifiersArray<string<bytes>>≥ 1 itemsunique itemstranslation_errorsoptionalTranslationError[]List of errors that occurred in the translation stage.
metadata.translation_errors[]. typeoptional"translation_failed" | "unsupported_translation_pair"metadata.translation_errors[]. messageoptionalstringHuman readable error message
summarization_errorsoptionalSummarizationError[]List of errors that occurred in the summarization stage.
metadata.summarization_errors[]. typeoptional"summarization_failed" | "unsupported_language"metadata.summarization_errors[]. messageoptionalstringHuman readable error message
sentiment_analysis_errorsoptionalSentimentAnalysisError[]List of errors that occurred in the sentiment analysis stage.
metadata.sentiment_analysis_errors[]. typeoptional"sentiment_analysis_failed" | "unsupported_language"metadata.sentiment_analysis_errors[]. messageoptionalstringHuman readable error message
topic_detection_errorsoptionalTopicDetectionError[]List of errors that occurred in the topic detection stage.
metadata.topic_detection_errors[]. typeoptional"topic_detection_failed" | "unsupported_list_of_topics" | "unsupported_language"metadata.topic_detection_errors[]. messageoptionalstringHuman readable error message
auto_chapters_errorsoptionalAutoChaptersResultError[]List of errors that occurred in the auto chapters stage.
metadata.auto_chapters_errors[]. typeoptional"auto_chapters_failed" | "unsupported_language"metadata.auto_chapters_errors[]. messageoptionalstringHuman readable error message
output_configoptionalOutputConfigmetadata.output_config. srt_overridesoptionalobjectParameters that override default values of srt conversion. max_line_length: sets maximum count of characters per subtitle line including white space. max_lines: sets maximum count of lines in a subtitle section.
metadata.output_config. srt_overrides. max_line_lengthoptionalintegermetadata.output_config. srt_overrides. max_linesoptionalintegerlanguage_pack_infooptionalLanguagePackInfoProperties of the language pack.
metadata.language_pack_info. language_descriptionoptionalstringFull descriptive name of the language, e.g. 'Japanese'.
metadata.language_pack_info. word_delimiterstringThe character to use to separate words.
metadata.language_pack_info. writing_directionoptional"left-to-right" | "right-to-left"The direction that words in the language should be written and read in.
metadata.language_pack_info. itnoptionalbooleanWhether or not ITN (inverse text normalization) is available for the language pack.
metadata.language_pack_info. adaptedoptionalbooleanWhether or not language model adaptation has been applied to the language pack.
language_identificationoptionalLanguageIdentificationResultmetadata.language_identification. resultsoptionalLanguageIdentificationResultItem[]metadata.language_identification. results[]. alternativesoptionalLanguageIdentificationResultAlternative[]metadata.language_identification. results[]. alternatives[]. languageoptionalstringmetadata.language_identification. results[]. alternatives[]. confidenceoptionalnumbermetadata.language_identification. results[]. start_timeoptionalnumbermetadata.language_identification. results[]. end_timeoptionalnumbermetadata.language_identification. erroroptionalenum"LOW_CONFIDENCE""UNEXPECTED_LANGUAGE""NO_SPEECH""FILE_UNREADABLE""OTHER"metadata.language_identification. messageoptionalstringorchestrator_versionoptionalstringOrchestrator version in PEP 440 Format or set to 'version_not_found' as default.
resultsRecognitionResult[]An ASR job output item. The primary item types are
wordandpunctuation. Other item types may be present, for example to provide semantic information of different forms.channeloptionalstringstart_timenumber<float>end_timenumber<float>volumeoptionalnumber<float>≥ 0, ≤ 100An indication of the volume of audio across the time period the word was spoken.
is_eosoptionalbooleanWhether the punctuation mark is an end of sentence character. Only applies to punctuation marks.
type"word" | "punctuation" | "entity"New types of items may appear without being requested; unrecognized item types can be ignored.
written_formoptionalWrittenFormRecognitionResult[]A WrittenFormRecognitionResult describes a simple object which consists solely of 'word' type entries with a start and end time. It can occur only inside the written_form property of a full RecognitionResult'
results[].written_form[]. alternativesRecognitionAlternative[]List of possible job output item values, ordered by likelihood.
results[].written_form[]. alternatives[]. contentstringresults[].written_form[]. alternatives[]. confidencenumber<float>results[].written_form[]. alternatives[]. languagestringresults[].written_form[]. alternatives[]. displayoptionalRecognitionDisplayresults[].written_form[]. alternatives[]. display. direction"ltr" | "rtl"results[].written_form[]. alternatives[]. speakeroptionalstringresults[].written_form[]. alternatives[]. tagsoptionalstring[]results[].written_form[]. end_timenumber<float>results[].written_form[]. start_timenumber<float>results[].written_form[]. type"word"What kind of object this is. See #/Definitions/RecognitionResult for definitions of the enums.
spoken_formoptionalSpokenFormRecognitionResult[]A SpokenFormRecognitionResult describes a simple object which consists solely of 'word' or 'punctuation' type entries with a start and end time. It can occur only inside the spoken_form property of a full 'RecognitionResult'
results[].spoken_form[]. alternativesRecognitionAlternative[]List of possible job output item values, ordered by likelihood.
results[].spoken_form[]. alternatives[]. contentstringresults[].spoken_form[]. alternatives[]. confidencenumber<float>results[].spoken_form[]. alternatives[]. languagestringresults[].spoken_form[]. alternatives[]. displayoptionalRecognitionDisplayresults[].spoken_form[]. alternatives[]. display. direction"ltr" | "rtl"results[].spoken_form[]. alternatives[]. speakeroptionalstringresults[].spoken_form[]. alternatives[]. tagsoptionalstring[]results[].spoken_form[]. end_timenumber<float>results[].spoken_form[]. start_timenumber<float>results[].spoken_form[]. type"word" | "punctuation"What kind of object this is. See #/Definitions/RecognitionResult for definitions of the enums.
alternativesoptionalRecognitionAlternative[]List of possible job output item values, ordered by likelihood.
results[].alternatives[]. contentstringresults[].alternatives[]. confidencenumber<float>results[].alternatives[]. languagestringresults[].alternatives[]. displayoptionalRecognitionDisplayresults[].alternatives[]. display. direction"ltr" | "rtl"results[].alternatives[]. speakeroptionalstringresults[].alternatives[]. tagsoptionalstring[]attaches_tooptionalenum"previous""next""both""none"Attachment direction of the punctuation mark. This only applies to punctuation marks. This information can be used to produce a well-formed text representation by placing the
word_delimiterfromlanguage_pack_infoon the correct side of the punctuation mark.speakersoptionalSpeakersResultItem[]List of unique speaker identifiers detected in the transcript.
labelstring≥ 1 charactersSpeaker label.
speaker_identifiersArray<string<bytes>>≥ 1 itemsunique itemstranslationsoptionalRecord<string, TranslationSentence[]>Translations of the transcript into other languages. It is a map of ISO language codes to arrays of translated sentences. Configured using
translation_config.[key: string]optionalTranslationSentence[]translations[key: string][].start_timeoptionalnumber<float>translations[key: string][].end_timeoptionalnumber<float>translations[key: string][].contentoptionalstringtranslations[key: string][].speakeroptionalstringtranslations[key: string][].channeloptionalstringsummaryoptionalSummarizationResultSummary of the transcript, configured using
summarization_config.contentoptionalstringsentiment_analysisoptionalSentimentAnalysisResultThe main object that holds sentiment analysis data.
sentiment_analysisoptionalobjectHolds the detailed sentiment analysis information.
sentiment_analysis.sentiment_analysis. segmentsoptionalSentimentSegment[]An array of objects that represent a segment of text and its associated sentiment.
sentiment_analysis.sentiment_analysis. segments[]. textoptionalstringRepresents the transcript of the analysed segment
sentiment_analysis.sentiment_analysis. segments[]. sentimentoptionalstringThe assigned sentiment to the segment, which can be positive, neutral or negative
sentiment_analysis.sentiment_analysis. segments[]. start_timeoptionalnumber<float>The timestamp corresponding to the beginning of the transcription segment
sentiment_analysis.sentiment_analysis. segments[]. end_timeoptionalnumber<float>The timestamp corresponding to the end of the transcription segment
sentiment_analysis.sentiment_analysis. segments[]. speakeroptionalstringThe speaker label for the segment, if speaker diarization is enabled
sentiment_analysis.sentiment_analysis. segments[]. channeloptionalstringThe channel label for the segment, if channel diarization is enabled
sentiment_analysis.sentiment_analysis. segments[]. confidenceoptionalnumber<float,>A confidence score in the range of 0-1, indicating the model's certainty in the predicted sentiment,
sentiment_analysis.sentiment_analysis. summaryoptionalSentimentSummaryHolds overall sentiment information, as well as detailed per-speaker and per-channel sentiment data.
sentiment_analysis.sentiment_analysis. summary. overalloptionalSentimentSummaryDetailHolds the count of sentiment information grouped by positive, neutral and negative.
sentiment_analysis.sentiment_analysis. summary. overall. positive_countoptionalintegersentiment_analysis.sentiment_analysis. summary. overall. negative_countoptionalintegersentiment_analysis.sentiment_analysis. summary. overall. neutral_countoptionalintegersentiment_analysis.sentiment_analysis. summary. speakersoptionalSentimentSpeakerSummary[]An array of objects that represent sentiment data for a specific speaker.
sentiment_analysis.sentiment_analysis. summary. speakers[]. speakeroptionalstringsentiment_analysis.sentiment_analysis. summary. speakers[]. positive_countoptionalintegersentiment_analysis.sentiment_analysis. summary. speakers[]. negative_countoptionalintegersentiment_analysis.sentiment_analysis. summary. speakers[]. neutral_countoptionalintegersentiment_analysis.sentiment_analysis. summary. channelsoptionalSentimentChannelSummary[]An array of objects that represent sentiment data for a specific channel.
sentiment_analysis.sentiment_analysis. summary. channels[]. channeloptionalstringsentiment_analysis.sentiment_analysis. summary. channels[]. positive_countoptionalintegersentiment_analysis.sentiment_analysis. summary. channels[]. negative_countoptionalintegersentiment_analysis.sentiment_analysis. summary. channels[]. neutral_countoptionalintegertopicsoptionalTopicDetectionResultMain object that holds topic detection results.
segmentsoptionalTopicDetectionSegment[]An array of objects that represent a segment of text and its associated topic information.
topics.segments[]. textoptionalstringtopics.segments[]. start_timeoptionalnumber<float>topics.segments[]. end_timeoptionalnumber<float>topics.segments[]. topicsoptionalTopicDetectionSegmentTopic[]Represents a topic and its associated information.
topics.segments[]. topics[]. topicoptionalstringsummaryoptionalTopicDetectionSummaryHolds overall information on the topics detected.
topics.summary. overalloptionalTopicDetectionSummaryOverallHolds the count of topics detected.
topics.summary. overall [key: string]optionalintegerchaptersoptionalAutoChaptersResultAn array of objects that represent summarized chapters of the transcript
titleoptionalstringThe auto-generated title for the chapter
summaryoptionalstringAn auto-generated paragraph-style, short summary of the chapter
start_timeoptionalnumberThe start time of the chapter in the audio file
end_timeoptionalnumberaudio_eventsoptionalAudioEventItem[]Timestamped audio events, only set if
audio_events_configis in the configtypeoptionalstringKind of audio event. E.g. music
start_timeoptionalnumber<float>Time (in seconds) at which the audio event starts
end_timeoptionalnumber<float>Time (in seconds) at which the audio event ends
confidenceoptionalnumber<float>Prediction confidence associated with this event
channeloptionalstringInput channel this event occurred on
audio_event_summaryoptionalobjectSummary statistics per event type, keyed by
type, e.g. musicoveralloptionalAudioEventSummaryaudio_event_summary.overall [key: string]optionalAudioEventSummaryItemSummary statistics for this audio event type
audio_event_summary.overall[key: string]. total_durationoptionalnumber<float>Total duration (in seconds) of all audio events of this type
audio_event_summary.overall[key: string]. countoptionalnumberNumber of events of this type
channelsoptionalRecord<string, AudioEventSummary>Summary keyed by channel, only set if channel diarization is enabled
audio_event_summary.channels [key: string]optionalAudioEventSummaryaudio_event_summary.channels[key: string] [key: string]optionalAudioEventSummaryItemSummary statistics for this audio event type
audio_event_summary.channels[key: string][key: string]. total_durationoptionalnumber<float>Total duration (in seconds) of all audio events of this type
audio_event_summary.channels[key: string][key: string]. countoptionalnumberNumber of events of this type
import { BatchClient } from "@speechmatics/batch-client";
const client = new BatchClient({ apiKey: "YOUR_API_KEY", appId: "my-app" });
const transcript = await client.getJobResult("JOB_ID", "text");
console.log(transcript);
from speechmatics.batch import Client
with Client(api_key="YOUR_API_KEY") as client:
transcript = client.get_transcript("JOB_ID")
print(transcript.transcript_text)
API_KEY="YOUR_API_KEY"
JOB_ID="JOB_ID"
curl -L -X GET "https://eu1.asr.api.speechmatics.com/v2/jobs/${JOB_ID}/transcript?format=txt" \
-H "Authorization: Bearer ${API_KEY}"
Examples
{
"format": "2.7",
"job": {
"created_at": "2018-01-09T12:29:01.853047Z",
"data_name": "recording.mp3",
"duration": 244,
"id": "a1b2c3d4e5",
"tracking": {
"title": "ACME Q12018 Statement",
"reference": "/data/clients/ACME/statements/segs/2018Q1-seg8",
"tags": [
"quick-review",
"segment"
],
"details": {
"client": "ACME Corp",
"segment": 8,
"seg_start": 963.201,
"seg_end": 1091.481
}
}
},
"metadata": {
"created_at": "2018-01-09T12:31:46.918860Z",
"type": "transcription",
"transcription_config": {
"additional_vocab": [
{
"content": "Speechmatics",
"sounds_like": [
"speechmatics"
]
},
{
"content": "gnocchi",
"sounds_like": [
"nyohki",
"nokey",
"nochi"
]
},
{
"content": "CEO",
"sounds_like": [
"C.E.O."
]
},
{
"content": "financial crisis"
}
],
"diarization": "channel",
"channel_diarization_labels": [
"Agent",
"Caller"
],
"language": "en"
}
},
"results": [
{
"channel": "Agent",
"start_time": 0.55,
"end_time": 1.2,
"type": "word",
"alternatives": [
{
"confidence": 0.95,
"content": "Hello",
"language": "en",
"display": {
"direction": "ltr"
}
}
]
},
{
"channel": "Agent",
"start_time": 1.45,
"end_time": 1.8,
"type": "word",
"alternatives": [
{
"confidence": 0.76,
"content": "world",
"language": "en",
"display": {
"direction": "ltr"
}
}
]
},
{
"channel": "Agent",
"start_time": 1.8,
"end_time": 1.8,
"type": "punctuation",
"alternatives": [
{
"confidence": 0.98,
"content": ".",
"language": "en",
"display": {
"direction": "ltr"
}
}
]
}
]
}SPEAKER: S1
Hello world.
{
"code": 401,
"error": "Permission Denied"
}{
"code": 404,
"error": "Job not found"
}{
"code": 410,
"error": "File Expired",
"detail": "File deleted from the storage"
}{
"code": 500,
"error": "Internal Server Error"
}