# Sonix **Repository Path**: fenixnix/sonix ## Basic Information - **Project Name**: Sonix - **Description**: 一个基于 Rust 的轻量级音乐播放器 REST API 服务。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-14 - **Last Updated**: 2026-03-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Sonix Project A complete headless music player solution based on Rust + MPV. ## Project Structure ``` Sonix/ ├── sonix/ # Rust REST API + WebSocket service │ ├── src/ # Source code │ ├── tests/ # Tests │ ├── Cargo.toml # Rust dependencies │ └── README.md # API documentation ├── bin/ # MPV binary files ├── docs/ # Documentation │ ├── MPV_Technical_Report.md │ ├── MPV技术报告.md │ └── Solution_Headless_Audio.md ├── AGENTS.md # Agent coding guidelines ├── start_mpv.bat # Windows MPV startup script ├── .gitignore # Git ignore rules └── README.md # This file ``` ## Components ### 1. Sonix API Service (`sonix/`) - **Language**: Rust - **Framework**: Axum (web), Tokio (async runtime) - **Features**: - REST API for playback control - WebSocket for real-time status updates - Volume control - Playlist management - Playback mode control ### 2. MPV Player (`bin/`) - **Purpose**: Media playback engine - **Version**: Latest git build - **Platforms**: Windows (x86_64) ### 3. Documentation (`docs/`) - Technical reports - Solution architecture - API documentation ## Quick Start ### Windows 1. **Start MPV** ```bash # Using start_mpv.bat .\start_mpv.bat # Or manually mpv --input-ipc-server=127.0.0.1:20000 --shuffle --loop-playlist "D:\Music" ``` 2. **Build and run Sonix API** ```bash cd sonix cargo build --release .\target\release\sonix.exe ``` 3. **Access API** - API: `http://localhost:8000` - WebSocket: `ws://localhost:8000/ws/status` ### Linux/macOS 1. **Install MPV** - Linux: `sudo apt install mpv` - macOS: `brew install mpv` 2. **Start MPV** ```bash mpv --input-ipc-server=/tmp/mpv.sock --shuffle --loop-playlist /path/to/music ``` 3. **Build and run Sonix API** ```bash cd sonix cargo build --release ./target/release/sonix ``` ## API Documentation See `sonix/README.md` for detailed API documentation. ## License MIT License