mirror of
https://github.com/m-bain/whisperX.git
synced 2025-07-01 18:17:27 -04:00
fix: Bug in type hinting
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
from typing import TypedDict, Optional
|
from typing import TypedDict, Optional, List
|
||||||
|
|
||||||
|
|
||||||
class SingleWordSegment(TypedDict):
|
class SingleWordSegment(TypedDict):
|
||||||
@ -38,15 +38,15 @@ class SingleAlignedSegment(TypedDict):
|
|||||||
start: float
|
start: float
|
||||||
end: float
|
end: float
|
||||||
text: str
|
text: str
|
||||||
words: list[SingleWordSegment]
|
words: List[SingleWordSegment]
|
||||||
chars: Optional[list[SingleCharSegment]]
|
chars: Optional[List[SingleCharSegment]]
|
||||||
|
|
||||||
|
|
||||||
class TranscriptionResult(TypedDict):
|
class TranscriptionResult(TypedDict):
|
||||||
"""
|
"""
|
||||||
A list of segments and word segments of a speech.
|
A list of segments and word segments of a speech.
|
||||||
"""
|
"""
|
||||||
segments: list[SingleSegment]
|
segments: List[SingleSegment]
|
||||||
language: str
|
language: str
|
||||||
|
|
||||||
|
|
||||||
@ -54,5 +54,5 @@ class AlignedTranscriptionResult(TypedDict):
|
|||||||
"""
|
"""
|
||||||
A list of segments and word segments of a speech.
|
A list of segments and word segments of a speech.
|
||||||
"""
|
"""
|
||||||
segments: list[SingleAlignedSegment]
|
segments: List[SingleAlignedSegment]
|
||||||
word_segments: list[SingleWordSegment]
|
word_segments: List[SingleWordSegment]
|
||||||
|
Reference in New Issue
Block a user