Skip to content

fix: add audio_url support to /transcribe endpoint for remote audio files#17

Open
sohampirale wants to merge 1 commit intoruxailab:mainfrom
sohampirale:fix/audio_url_transcribe_route
Open

fix: add audio_url support to /transcribe endpoint for remote audio files#17
sohampirale wants to merge 1 commit intoruxailab:mainfrom
sohampirale:fix/audio_url_transcribe_route

Conversation

@sohampirale
Copy link
Copy Markdown

PR Description

Summary

This PR adds support for audio_url parameter to the /transcribe endpoint, allowing the frontend to send audio file url from Firebase storage instead of requiring local file paths.

Fixes : #16


Changes Made

  • Modified the /transcribe endpoint to accept both file_path and audio_url parameters
  • Implemented URL handling with the AudioService for remote audio files
  • Added validation to ensure either file_path or audio_url is provided (but not both)
  • Added cleanup logic for temporary files when using URL input
  • Updated the request model to include the audio_url field
  • Used audio_url field name to maintain consistency with existing frontend implementation

Note on Schema Mismatch

While implementing this feature, we discovered a schema mismatch between what the backend returns and what the frontend expects. The backend endpoints (/transcribe and /chunks) return data in a different format than what the frontend is designed to render. Specifically:

This will require corresponding frontend changes to properly handle the data returned by these endpoints.


Testing

  • Verified that the endpoint works with both file_path and audio_url inputs

  • Confirmed that validation prevents sending both parameters simultaneously

  • Tested cleanup of temporary files when using URL input

  • Ensured backward compatibility with existing file_path usage

  • Working successfully with frontend

Screenshot from 2026-02-15 09-03-41
  • Working successfully with file_path
Screenshot from 2026-02-15 09-06-22
  • Working successfully with audio_url
Screenshot from 2026-02-15 08-59-45

@sohampirale
Copy link
Copy Markdown
Author

@jvJUCA Can you please take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add audio_url support to /transcribe endpoint for remote audio files from frontend

1 participant