- 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
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
/transcribeendpoint currently only accepts localfile_pathparameters, 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/transcribewith anaudio_urlparameter, but the backend only acceptsfile_path. This prevents the frontend from using audio files stored remotely in Firebase.Screenshots
Current expected body schema
Filepath :
app/routes/transcript_routes.pyProposed Solution
The solution should:
/transcribeendpoint to accept bothfile_pathandaudio_urlparametersAudioServicefor remote audio filesfile_pathoraudio_urlis provided (but not both)file_pathfunctionality