Feat: Improve alignment for the audio with background noise (#870)
* use echogarden.alignSegments * fix cloudflare whisper * refactor azure ai transcribe * refactor * fix align result * refactor * edit transcription in srt format * improve timeline * refactor * fix update current segment index * validate text when use upload transcript * add form description * refactor codes * do not change sentence timeline based on word timeline
This commit is contained in:
@@ -68,7 +68,7 @@ type MediaPlayerContextType = {
|
||||
generateTranscription: (params?: {
|
||||
originalText?: string;
|
||||
language?: string;
|
||||
service?: WhisperConfigType["service"];
|
||||
service?: WhisperConfigType["service"] | "upload";
|
||||
isolate?: boolean;
|
||||
}) => Promise<void>;
|
||||
transcribing: boolean;
|
||||
@@ -352,7 +352,7 @@ export const MediaPlayerProvider = ({
|
||||
|
||||
let phones: TimelineEntry[] = [];
|
||||
words.forEach((word: TimelineEntry) => {
|
||||
word.timeline.forEach((token: TimelineEntry) => {
|
||||
word.timeline?.forEach((token: TimelineEntry) => {
|
||||
phones = phones.concat(token.timeline);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user