What happened?
The audio-upload flow is broken end to end:
- The frontend posts the file to
/api/huggingface/upload-audio, which streams it to ${java.io.tmpdir}/texera-hf-audio and returns the absolute server path (HuggingFaceModelResource.scala ~L171-177). The upload component stores that path in the operator's audioInput property (hugging-face-audio-upload.component.ts ~L118).
- The generated Python's
_read_audio_input (PythonCodegenBase.scala ~L797-811) deliberately accepts only data: and https URLs and raises for anything else (filesystem reads were removed as LFI hardening).
Nothing converts the path in between, so every ASR / audio-classification run with an uploaded file fails per-row with "Audio task configuration error: Could not read audio input (ValueError: Unsupported audio input ...)".
The path design is unsound even aside from that: the Python worker need not share a filesystem with the web server in distributed deployments, and the temp file is swept after 1 hour (AUDIO_TEMP_TTL_MS) and on JVM exit (deleteOnExit), so saved workflows hold dangling references. The leftover file-extension map in _get_audio_content_type suggests filesystem support was removed on the Python side without updating the upload flow. Image upload works because that component inlines a data:image/... URL instead.
Fix requires a design decision:
- Option A: match the image component: read the file in the browser and store a
data:audio/... URL in audioInput. Simple, drops the temp-file endpoints entirely; cost is workflow-JSON bloat (uploads are capped at 25 MiB today).
- Option B: store uploads somewhere the worker can reach (e.g. dataset storage) and save a URL that the existing hardened
https fetch path can consume.
Either way, /upload-audio, /audio-preview, and the preview component must be updated to match, plus spec coverage for the chosen format.
How to reproduce?
- Add the operator with task
automatic-speech-recognition and upload an audio file in the property panel (the saved value is a server path like /tmp/texera-hf-audio/hf-audio-XXXX.mp3).
- Run the workflow: every row's result column shows "Could not read audio input (ValueError: Unsupported audio input ...)".
Version/Branch
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
No response
What browsers are you seeing the problem on?
No response
Relevant log output
What happened?
The audio-upload flow is broken end to end:
/api/huggingface/upload-audio, which streams it to${java.io.tmpdir}/texera-hf-audioand returns the absolute server path (HuggingFaceModelResource.scala~L171-177). The upload component stores that path in the operator'saudioInputproperty (hugging-face-audio-upload.component.ts~L118)._read_audio_input(PythonCodegenBase.scala~L797-811) deliberately accepts onlydata:andhttpsURLs and raises for anything else (filesystem reads were removed as LFI hardening).Nothing converts the path in between, so every ASR / audio-classification run with an uploaded file fails per-row with "Audio task configuration error: Could not read audio input (ValueError: Unsupported audio input ...)".
The path design is unsound even aside from that: the Python worker need not share a filesystem with the web server in distributed deployments, and the temp file is swept after 1 hour (
AUDIO_TEMP_TTL_MS) and on JVM exit (deleteOnExit), so saved workflows hold dangling references. The leftover file-extension map in_get_audio_content_typesuggests filesystem support was removed on the Python side without updating the upload flow. Image upload works because that component inlines adata:image/...URL instead.Fix requires a design decision:
data:audio/...URL inaudioInput. Simple, drops the temp-file endpoints entirely; cost is workflow-JSON bloat (uploads are capped at 25 MiB today).httpsfetch path can consume.Either way,
/upload-audio,/audio-preview, and the preview component must be updated to match, plus spec coverage for the chosen format.How to reproduce?
automatic-speech-recognitionand upload an audio file in the property panel (the saved value is a server path like/tmp/texera-hf-audio/hf-audio-XXXX.mp3).Version/Branch
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
No response
What browsers are you seeing the problem on?
No response
Relevant log output