def fetch_audio_chunk(self, start_time: float, duration: float, output_file: str) -> str:
        """
        Fetch an audio chunk from the url, starting at start_time and lasting duration seconds. Return the path to the
        downloaded audio chunk.
        Args:
            start_time: The start time of the audio chunk
            duration: The duration of the audio chunk
            output_file: The path to save the audio chunk

        Returns:
            The path to the downloaded audio chunk
        """
        ffmpeg_command = [
            'ffmpeg',
            '-y', # Enable overwrite
            '-v', 'error',  # Suppress warnings and other output
        ]
        if self.media_download_header:
            # -headers must appear before -i
            ffmpeg_command.extend(['-headers', self.media_download_header])

        ffmpeg_command.extend(
            [
                '-i', str(self.url),  # Input file
                '-ss', str(start_time),  # Start time
                '-t', str(duration),  # Duration
                '-acodec', 'pcm_s16le',  # Audio codec
                '-ar', '44100',  # Audio sample rate
                '-f', 'wav',  # Output format
                output_file  # Output file
            ]
        )
        timeout = duration * self.AUDIO_CPU_TIMOUT_OUT_MULTIPLIER

        base_error_message = f"Error downloading the audio chunk with url={self.url}, start_time={start_time},"
        try:
            self._run_ffmpeg_command(ffmpeg_command, timeout, base_error_message)
        except (MediaDownloadError, InternalError):
            if os.path.exists(output_file): # Remove the file if it was created
                os.remove(output_file)
            raise
        return output_file

        Fetch an audio chunk from the url, starting at start_time and lasting duration seconds. Return the path to the
        downloaded audio chunk.
        Args:
            start_time: The start time of the audio chunk
            duration: The duration of the audio chunk
            output_file: The path to save the audio chunk

        Returns:
            The path to the downloaded audio chunk
        
src/marqo/inference/media_download_and_preprocess/streaming_media_processor.py