tts: show speaking sentence and chapter info in tts media session (#1289)

This commit is contained in:
Huang Xin
2025-05-31 15:21:17 +08:00
committed by GitHub
parent e4d217f3aa
commit 77fa57438e
14 changed files with 148 additions and 34 deletions
+1 -6
View File
@@ -1,9 +1,4 @@
type TTSMark = {
offset: number;
name: string;
text: string;
language?: string;
};
import { TTSMark } from '@/services/tts/types';
const cleanTextContent = (text: string) =>
text.replace(/\r\n/g, ' ').replace(/\r/g, ' ').replace(/\n/g, ' ').trimStart();