Merge pull request #3300 from pangeachat/translate-bot-audio-messages

chore: add bot speech to text to respresentations list
This commit is contained in:
ggurdin 2025-06-30 14:46:40 -04:00 committed by GitHub
commit edb41b9755
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -266,6 +266,21 @@ class PangeaMessageEvent {
final botTranscription = SpeechToTextModel.fromJson(
Map<String, dynamic>.from(rawBotTranscription),
);
_representations?.add(
RepresentationEvent(
timeline: timeline,
parentMessageEvent: _event,
content: PangeaRepresentation(
langCode: botTranscription.langCode,
text: botTranscription.transcript.text,
originalSent: false,
originalWritten: false,
speechToText: botTranscription,
),
),
);
return botTranscription;
}