Merge pull request #5566 from pangeachat/5565-client-should-send-audio-transcription-instead-of-audio-content-body-to-construct-summary
fix: include stt for audio messages in level summary request
This commit is contained in:
commit
e83e0200ac
2 changed files with 17 additions and 6 deletions
|
|
@ -84,10 +84,19 @@ class LevelUpAnalyticsService {
|
|||
ownMessage: room.client.userID == event.senderId,
|
||||
);
|
||||
|
||||
messages.add({
|
||||
'sent': pangeaEvent.originalSent?.text ?? pangeaEvent.body,
|
||||
'written': pangeaEvent.originalWrittenContent,
|
||||
});
|
||||
if (pangeaEvent.isAudioMessage) {
|
||||
final stt = pangeaEvent.getSpeechToTextLocal();
|
||||
if (stt == null) continue;
|
||||
messages.add({
|
||||
'sent': stt.transcript.text,
|
||||
'written': stt.transcript.text,
|
||||
});
|
||||
} else {
|
||||
messages.add({
|
||||
'sent': pangeaEvent.originalSent?.text ?? pangeaEvent.body,
|
||||
'written': pangeaEvent.originalWrittenContent,
|
||||
});
|
||||
}
|
||||
} catch (e, s) {
|
||||
ErrorHandler.logError(
|
||||
e: e,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/pangea/common/utils/error_handler.dart';
|
||||
import 'package:fluffychat/pangea/practice_activities/activity_type_enum.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// list ordered by priority
|
||||
enum PartOfSpeechEnum {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue