From 3f3d2c34744a5986180a3178bd4fb1af2094f10a Mon Sep 17 00:00:00 2001 From: Aazam Thakur <59562284+aazam-gh@users.noreply.github.com> Date: Sun, 29 Oct 2023 00:03:22 +0530 Subject: [PATCH] docs: add return types in docstring for transcribe and run function (#6177) --- haystack/nodes/audio/whisper_transcriber.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/haystack/nodes/audio/whisper_transcriber.py b/haystack/nodes/audio/whisper_transcriber.py index d43d3f3e22..66f7480539 100644 --- a/haystack/nodes/audio/whisper_transcriber.py +++ b/haystack/nodes/audio/whisper_transcriber.py @@ -91,6 +91,7 @@ def transcribe( :param return_segments: If True, returns the transcription for each segment of the audio file. Supported with local installation of whisper only. :param translate: If True, translates the transcription to English. + :return: A dictionary containing the transcription text and metadata like timings, segments etc. """ transcript: Dict[str, Any] = {} @@ -176,6 +177,8 @@ def run( :param labels: Ignored :param documents: Ignored :param meta: Ignored + :return: A dictionary containing a list of Document objects, one for each input file. + """ transcribed_documents: List[Document] = [] if file_paths: