From 5a4382ae4d42f64c156acc48bfd18c4a08e737a9 Mon Sep 17 00:00:00 2001 From: Master X Date: Tue, 30 May 2023 15:11:07 +0500 Subject: [PATCH] fix: Bug in type hinting --- whisperx/types.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/whisperx/types.py b/whisperx/types.py index 75d4485..68f2d78 100644 --- a/whisperx/types.py +++ b/whisperx/types.py @@ -1,4 +1,4 @@ -from typing import TypedDict, Optional +from typing import TypedDict, Optional, List class SingleWordSegment(TypedDict): @@ -38,15 +38,15 @@ class SingleAlignedSegment(TypedDict): start: float end: float text: str - words: list[SingleWordSegment] - chars: Optional[list[SingleCharSegment]] + words: List[SingleWordSegment] + chars: Optional[List[SingleCharSegment]] class TranscriptionResult(TypedDict): """ A list of segments and word segments of a speech. """ - segments: list[SingleSegment] + segments: List[SingleSegment] language: str @@ -54,5 +54,5 @@ class AlignedTranscriptionResult(TypedDict): """ A list of segments and word segments of a speech. """ - segments: list[SingleAlignedSegment] - word_segments: list[SingleWordSegment] + segments: List[SingleAlignedSegment] + word_segments: List[SingleWordSegment]