Skip to main content

Transcription

The Transcription class represents the textual transcription of a consultation. This transcription is typically generated by speech recognition or manually recorded during the consultation.

Fields

  • transcript: (String) - The full text of the consultation's transcription.

Example Usage

Once the transcription has been retrieved from the model, it can be displayed, stored, or further processed for analysis or record-keeping.

Example of Handling Transcription Returned from the Model

Here’s an example showing how to fetch and handle a transcription using getTranscription.

// Function to handle a transcription returned from the model
fun handleTranscription(transcription: Transcription) {
println("Consultation Transcript: ${transcription.transcript}")
}

// Fetch the transcription using the API
fun fetchTranscription(consultationId: String) {
getTranscription(consultationId, object : ApiCallback<Transcription> {
override fun onSuccess(result: Transcription) {
handleTranscription(result)
}

override fun onRequestError(errorMessage: String?) {
println("Error fetching Transcription: $errorMessage")
}
})
}

// Example usage of fetching and handling a Transcription
fetchTranscription("12345")