- Python 3.12+
- Docker (for Redis)
- FFmpeg installed on system
pip install -r requirements.txtOr using uv (recommended):
uv synccp .env.example .envEdit .env if needed to customize settings.
docker-compose up -dVerify Redis is running:
docker-compose psOpen two terminal windows:
Terminal 1 - FastAPI Server:
./start_server.shOr manually:
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadTerminal 2 - Celery Worker:
./start_worker.shOr manually:
celery -A app.celery_app worker --loglevel=info --concurrency=2Visit http://localhost:8000/docs to see the Swagger UI.
Check health endpoint:
curl http://localhost:8000/healthExpected response:
{
"status": "healthy",
"service": "hiserver"
}# 1. Enqueue task
curl -X POST "http://localhost:8000/tasks/audio-separation/enqueue" \
-F "audio_file=@your_song.mp3" \
-F "instruments=bass,drums,vocals"
# Response: {"jobId":"abc-123","status":"queued","queuedAt":"2024-..."}
# 2. Check status (replace JOB_ID with actual ID from step 1)
curl "http://localhost:8000/tasks/audio-separation/status/JOB_ID"
# 3. Get result (when status is "completed")
curl "http://localhost:8000/tasks/audio-separation/result/JOB_ID"# Run complete pipeline: separation → transcription → chord recognition
curl -X POST "http://localhost:8000/tasks/e2e-base-ready/enqueue" \
-F "audio_file=@your_song.mp3" \
-F "instrument=bass"
# Check status
curl "http://localhost:8000/tasks/e2e-base-ready/status/JOB_ID"
# Get results
curl "http://localhost:8000/tasks/e2e-base-ready/result/JOB_ID"curl -X POST "http://localhost:8000/operations/alternative-chord-recommendation" \
-F "chord_file=@chords.json" \
-F "chord_index=2"celery -A app.celery_app inspect activedocker exec -it hiserver_redis redis-cli pingShould return: PONG
FastAPI logs appear in Terminal 1. Celery worker logs appear in Terminal 2.
Press Ctrl+C in both terminal windows.
docker-compose downProblem: ConnectionError: Error 111 connecting to localhost:6379
Solution:
docker-compose up -d
docker-compose ps # Verify redis is runningProblem: ModuleNotFoundError: No module named 'halmoni' or 'hiscore'
Solution: The server automatically adds halmoni and hiscore to Python path. Make sure you're running from the project root directory.
Problem: File upload rejected
Solution: Increase MAX_FILE_SIZE in .env file (default is 100MB).
- Read README.md for detailed API documentation
- Visit http://localhost:8000/docs for interactive API documentation
- Check api.yaml for the OpenAPI specification