Skip to content

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

@sohampirale

Description

@sohampirale
  • The /transcribe endpoint currently only accepts local file_path parameters, but the frontend needs to send audio URLs from Firebase storage. We need to enhance the endpoint to support both local file paths and remote URLs for audio transcription.

Currently, the frontend sends requests to /transcription/transcribe with an audio_url parameter, but the backend only accepts file_path. This prevents the frontend from using audio files stored remotely in Firebase.


Screenshots

Image
  • Current expected body schema

  • Filepath : app/routes/transcript_routes.py

transcription_transcribe_request_model = api.model('TranscriptionTranscribeRequestModel', {
      'file_path': fields.String(required=True, description='Path of the audio file.', example='audio.mp3')
})

Proposed Solution

The solution should:

  • Allow the /transcribe endpoint to accept both file_path and audio_url parameters
  • Implement URL handling with the AudioService for remote audio files
  • Add validation to ensure either file_path or audio_url is provided (but not both)
  • Maintain backward compatibility with existing file_path functionality

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions