Skip to content

Commit

Permalink
Cleaner import, hold of deprecation for now
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbrickhouse committed Apr 9, 2024
1 parent f86f1c3 commit 711f2a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fave_asr/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from fave_asr.fave_asr import *
from fave_asr.fave_asr import align, align_segments, assign_speakers, diarize, transcribe, transcribe_and_diarize, to_TextGrid
3 changes: 2 additions & 1 deletion src/fave_asr/fave_asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def diarize(audio_file: str, hf_token: str) -> Dict[str, Any]:
diarization_result = diarization_pipeline(audio_file)
return diarization_result

@warnings.deprecated("Redundant with assign_word_speakers")
def assign_speakers(
diarization_result: Dict[str, Any], aligned_segments: Dict[str, Any]
) -> List[Dict[str, Any]]:
Expand All @@ -116,6 +115,8 @@ def assign_speakers(
A list of dictionaries representing each segment of the transcript, including
the start and end times, the spoken text, and the speaker ID.
"""
# Considering deprecation
# warnings.warn("Redundant with assign_word_speakers", DeprecationWarning)
result_segments = assign_word_speakers(
diarization_result, aligned_segments
)
Expand Down

0 comments on commit 711f2a9

Please sign in to comment.