Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions optimum/exporters/executorch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ def process_conversation_inputs(

# Download and process audio
try:
resp = requests.get(audio_path)
resp = requests.get(audio_path, timeout=30)
resp.raise_for_status()
buf = io.BytesIO(resp.content)
except requests.exceptions.RequestException:
print("Could not download input audio file.")
except requests.exceptions.RequestException as e:
raise RuntimeError(f"Could not download input audio file from '{audio_path}': {e}") from e

wav, sampling_rate = torchaudio.load(buf, normalize=True)
if wav.shape[0] != 1:
Expand Down