# hanxi/xiaomusic

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/hanxi-xiaomusic).**

9,222 stars · 978 forks · Python · mit

## Links

- GitHub: https://github.com/hanxi/xiaomusic
- Homepage: http://xdocs.hanxi.cc/
- awesome-repositories: https://awesome-repositories.com/repository/hanxi-xiaomusic.md

## Topics

`docker` `docker-compose` `music` `pdm` `python` `vue` `xiaoai` `xiaoai-speaker` `xiaomi` `xiaomusic`

## Description

Xiaomusic is a remote media control system designed for Xiaomi smart speaker integration. It enables the streaming of custom audio sources and network playlists to compatible hardware via a centralized software interface.

The system manages network audio streaming by loading external JSON configurations and parsing M3U playlist files. It includes capabilities for directory-based file discovery to index local audio files and performs dynamic audio format conversion to ensure compatibility with the hardware output device.

Playback is managed through a command-driven interface that supports track navigation and state-based sequencing for shuffle and loop modes. The project also includes utilities for music playlist organization and the management of favorite tracks.

## Tags

### Networking & Communication

- [Remote Control Interfaces](https://awesome-repositories.com/f/networking-communication/remote-control-interfaces.md) — Provides a centralized network-based service to command media playback states on smart speakers.
- [Playlist Formats](https://awesome-repositories.com/f/networking-communication/playlist-formats.md) — Parses standard M3U playlist files into internal structures to enable sequential audio streaming.
- [Audio Streaming Servers](https://awesome-repositories.com/f/networking-communication/socket-networking/audio-streaming-servers.md) — Acts as a server for streaming audio data from playlists and configurations to smart hardware.

### Graphics & Multimedia

- [Audio Playback](https://awesome-repositories.com/f/graphics-multimedia/audio-music/audio-playback.md) — Implements a framework for playing remote audio files with integrated playback controls. ([source](https://cdn.jsdelivr.net/gh/hanxi/xiaomusic@main/README.md))
- [Playlist Configurations](https://awesome-repositories.com/f/graphics-multimedia/playlist-configurations.md) — Loads external metadata and track lists from JSON files to define network-based music streams.
- [Playlist Aggregators](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/playlist-aggregators.md) — Streams audio tracks and radio stations by aggregating sources from JSON configurations and M3U playlist files. ([source](https://cdn.jsdelivr.net/gh/hanxi/xiaomusic@main/README.md))
- [Audio Playlist Managers](https://awesome-repositories.com/f/graphics-multimedia/streaming-distribution/streaming-broadcasting/media-streaming/playlist-aggregators/personal-playlist-managers/audio-playlist-managers.md) — Creates and organizes curated collections of audio tracks for playback across network devices.
- [General Format Conversion](https://awesome-repositories.com/f/graphics-multimedia/audio-music/audio-playback/audio-conversion-utilities/general-format-conversion.md) — Transcodes audio containers into compatible formats to ensure support on the target hardware device.
- [Format Converters](https://awesome-repositories.com/f/graphics-multimedia/audio-music/audio-processing/format-converters.md) — Handles the conversion of diverse audio file formats to ensure compatibility with hardware devices. ([source](https://cdn.jsdelivr.net/gh/hanxi/xiaomusic@main/README.md))
- [Media File Indexing](https://awesome-repositories.com/f/graphics-multimedia/media-file-indexing.md) — Automatically scans local folder hierarchies to index audio files for playback and organization.
- [Music Collection Organization](https://awesome-repositories.com/f/graphics-multimedia/music-collection-organization.md) — Organizes audio playback data into personalized collections based on local directories or curated lists. ([source](http://xdocs.hanxi.cc/issues/index.html))
- [Playback Sequence Modes](https://awesome-repositories.com/f/graphics-multimedia/playback-sequence-modes.md) — Allows configuring audio sequences to loop a single track, loop all tracks, or shuffle the order. ([source](https://cdn.jsdelivr.net/gh/hanxi/xiaomusic@main/README.md))

### Hardware & IoT

- [Xiaomi Speaker Integrations](https://awesome-repositories.com/f/hardware-iot/xiaomi-speaker-integrations.md) — Connects and controls Xiaomi smart speakers to stream custom audio sources and network playlists.

### Development Tools & Productivity

- [Media Playback Controllers](https://awesome-repositories.com/f/development-tools-productivity/command-line-interface-controllers/media-playback-controllers.md) — Implements a command-driven interface to programmatically trigger internal audio playback functions.

### Software Engineering & Architecture

- [Playback Sequence Management](https://awesome-repositories.com/f/software-engineering-architecture/state-machine-logic/playback-sequence-management.md) — Manages a central state machine to handle track sequencing for looping and random shuffle modes.
