File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -716,6 +716,7 @@ class TranscriptionClient(TranscriptionTeeClient):
716
716
no_speech_thresh (float, optional): Segments with no speech probability above this threshold will be discarded. Defaults to 0.45.
717
717
clip_audio (bool, optional): Whether to clip audio with no valid segments. Defaults to False.
718
718
same_output_threshold (int, optional): Number of repeated outputs before considering it as a valid segment. Defaults to 10.
719
+ transcription_callback (callable, optional): A callback function to handle transcription results. Default is None.
719
720
720
721
Attributes:
721
722
client (Client): An instance of the underlying Client class responsible for handling the WebSocket connection.
@@ -747,6 +748,7 @@ def __init__(
747
748
no_speech_thresh = 0.45 ,
748
749
clip_audio = False ,
749
750
same_output_threshold = 10 ,
751
+ transcription_callback = None ,
750
752
):
751
753
self .client = Client (
752
754
host ,
@@ -764,6 +766,7 @@ def __init__(
764
766
no_speech_thresh = no_speech_thresh ,
765
767
clip_audio = clip_audio ,
766
768
same_output_threshold = same_output_threshold ,
769
+ transcription_callback = transcription_callback ,
767
770
)
768
771
769
772
if save_output_recording and not output_recording_filename .endswith (".wav" ):
You can’t perform that action at this time.
0 commit comments