getTranslatedTranscriptFormattedToSave static method
- @Deprecated('No longer in use. Replaced by getFormattedTranscriptToSave which handles both ' 'caption and translated caption in a unified format. Kept for reference in case ' 'separate translated transcript formatting is needed again in the future.')
String
getTranslatedTranscriptFormattedToSave(
- List<TranscriptionModel> transcriptions
)
Implementation
@Deprecated(
'No longer in use. Replaced by getFormattedTranscriptToSave which handles both '
'caption and translated caption in a unified format. Kept for reference in case '
'separate translated transcript formatting is needed again in the future.'
)
static String getTranslatedTranscriptFormattedToSave(
List<TranscriptionModel> transcriptions) {
StringBuffer contentBuffer = StringBuffer();
for (var entry in transcriptions) {
if (entry.isFinal) {
final String textToUse = (entry.translatedTranscription != null &&
entry.translatedTranscription!.trim().isNotEmpty)
? (entry.translatedTranscription ?? "")
: entry.transcription;
contentBuffer.writeln('${entry.name} ${entry.timestamp}');
contentBuffer.writeln(textToUse);
contentBuffer.writeln();
contentBuffer.writeln();
}
}
return contentBuffer.toString();
}