-
Notifications
You must be signed in to change notification settings - Fork 0
RescueBoxAPI
jai kumar edited this page Mar 4, 2025
·
8 revisions
This is a FastAPI application that provides a set of endpoints for the RescueBox project by converting the existing CLI commands into REST API endpoints.
# src/rb-api
poetry install
poetry run python -m src.rb-api.rb.api.main
# or
#
./run_server
The API server will be available at http://localhost:8000.
Test rest-api with curl or RescueBox-Desktop UI
curl "http://localhost:8000/audio/app_metadata"
curl -ilk -v -X POST --data @audio.json --header "Content-Type: application/json" "http://localhost:8000/audio/transcribe"
where audio.json contains the json path to the mp3 file
'{"inputs": {"dir_input": {"path": "C:\\src\rb-audio-transcription\tests"}} }'
poetry run typer rb_audio_transcription.main run --help
poetry run typer rb_audio_transcription.main run transcribe "full_path_to_mp3_file"
poetry run pytest src\rb-audio-transcription\tests\test_main.py -s