Manual Installation & Python Setup
If you wish to develop custom engines, contribute to OneASR, or run natively on Apple Silicon Mac without Docker, follow this setup guide.
1. Prerequisites
- Python: 3.10 or 3.11 (Python 3.12+ support is in progress)
- FFmpeg: Required for audio decoding and resampling (
brew install ffmpegon macOS,apt install ffmpegon Ubuntu) - Git & Git LFS: For repository and model weights cloning
2. Clone & Environment Setup
bash
# 1. Clone repository
git clone https://github.com/codeAndxv/OneASR.git
cd OneASR
# 2. Create Python virtual environment
python3 -m venv .venv
source .venv/bin/activate
# 3. Upgrade pip and install core dependencies
pip install --upgrade pip
pip install -r requirements.txt3. Download Models
Place the model weights into the models/ directory according to your enabled engines in config.yaml:
bash
# Faster-Whisper Medium
git clone https://huggingface.co/Systran/faster-whisper-medium models/faster-whisper-medium
# X-ASR Streaming Model (Sherpa-ONNX Zipformer)
# Place encoder, decoder, joiner, tokens.txt inside models/chunk-160ms-model/4. Run Server
Start the FastAPI server via Uvicorn:
bash
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadOutput:
text
INFO: Started server process [88412]
INFO: Waiting for application startup.
INFO: Preloading ASR Engine: xasr
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)5. Web Console Development
The embedded frontend is built with Vue 3 + Vite:
bash
cd web
npm install
npm run dev # Runs on http://localhost:5173 with proxy to :8000