TranscriptionResult - results of an audio transcription

Overview

TranscriptionResult(words, unknownValue, ...)

Descriptor for returned transcription data.

Details

class psychopy.sound.TranscriptionResult(words, unknownValue, requestFailed, engine, language)[source]

Descriptor for returned transcription data.

Fields within this class can be used to access transcribed words and other information related to the transcription request.

This is returned by functions and methods which perform speech-to-text transcription from audio data within PsychoPy. The user usually does not create instances of this class themselves.

Parameters
  • words (list of str) – Words extracted from the audio clip.

  • unknownValue (bool) – True if the transcription API failed make sense of the audio and did not complete the transcription.

  • requestFailed (bool) – True if there was an error with the transcriber itself. For instance, network error or improper formatting of the audio data.

  • engine (str) – Name of engine used to perform this transcription.

  • language (str) – Identifier for the language used to perform the transcription.

property engine

Name of engine used to perform this transcription (str).

property error

True if there was an error during transcription (bool). Value is always the compliment of .success.

property language

Identifier for the language used to perform the transcription (str).

property requestFailed

True if there was an error with the transcriber itself (bool). For instance, network error or improper formatting of the audio data, invalid key, or if there was network connection error.

property success

True if the transcriber returned a result successfully (bool).

property unknownValue

True if the transcription API failed make sense of the audio and did not complete the transcription (bool).

property wordCount

Number of words found (int).

property words

Words extracted from the audio clip (list of str).


Back to top