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.
import com.altibbi.telehealth.ApiService
import com.altibbi.telehealth.model.Transcription
import com.altibbi.telehealth.ApiCallback
// 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) {
ApiService.getTranscription(consultationId, object : ApiCallback<Transcription> {
override fun onSuccess(response: Transcription) {
handleTranscription(response)
}
override fun onFailure(error: String?) {
println("Error fetching Transcription: $error")
}
override fun onRequestError(error: String?) {
println("Request error: $error")
}
})
}
// Example usage of fetching and handling a Transcription
fetchTranscription("12345")