This repo contains everything needed to run the SiMa liquid-audio model on SiMa Modalix.
It includes:
- the local web app
- install and run scripts
- example request scripts for direct backend usage
The app supports:
ASRTTSInterleaved (Speech2Speech)
Runtime architecture:
app.py consumes those SSE streams server-side and forwards the streamed text/audio updates to the browser over Socket.IO.
To run this demo, you need these three things in one workspace folder:
- this repo:
sima-liquid-audio/ - the
sima_lmmwheel - the compiled model folder
Recommended setup layout:
liquid_audio/
sima-liquid-audio/
sima_lmm-<version>.whl
<compiled-model-folder>/
mkdir -p liquid_audio
cd liquid_audiogit clone git@github.com:florianvoss-commit/sima-liquid-audio.gitDownload the wheel from:
and place it here:
liquid_audio/sima_lmm-2.1.0-cp311-cp311-linux_aarch64.whl
The compiled model should sit next to sima-liquid-audio, not inside it.
Example:
cd ..
git clone https://huggingface.co/florianvoss/LFM2.5-Audio-1.5B_compiledExample result:
liquid_audio/
sima-liquid-audio/
sima_lmm-2.1.0-cp311-cp311-linux_aarch64.whl
LFM2.5-Audio-1.5B_compiled/
cd sima-liquid-audio
./install.shWhat this does:
- creates a local virtual environment in
.venv - installs Python dependencies from
requirements.txt - installs the latest parent-directory
sima_lmm-*.whl
Important:
install.shexpects a builtsima_lmmwheel to exist in the parent directory- the venv is created with
--system-site-packages - the script force-reinstalls the wheel into the app venv so it is used even if another
sima_lmmversion exists globally
Show help:
./run.sh --helpCurrent usage:
Usage: ./run.sh [options] [-- app.py options]
Modes:
(default) Start backend + frontend
--frontend-only Start only frontend app.py
--backend-only Start only sima_lmm backend
Options:
-h, --help Show this help
Behavior:
run.shauto-detects a compiled model in the parent directory- backend startup uses:
python -m sima_lmm.devkit.devkit_demo run <MODEL_PATH> --mode web- combined mode prompts for
sudofirst, then starts backend and frontend app.pyalways talks to the local backend at127.0.0.1:9998--frontend-onlydoes not require a local model checkout and is useful if the backend is already running on the same device
Start backend + frontend:
./run.shStart only frontend against an existing backend:
./run.sh --frontend-onlyStart only backend:
./run.sh --backend-onlyThe current UI supports:
ASRTTSInterleaved (Speech2Speech)
Notes:
- ASR streams transcript updates into the chat UI
- TTS streams audio chunks from the backend and plays them in the browser
- interleaved sends microphone audio to
/v1/realtimeand streams both text and audio back - the editable prompt in the UI is currently sent to interleaved mode as ordinary
textinput, not as a privileged backend system prompt
For interleaved mode:
- when
Include chat historyis enabled,app.pysendsinclude_chat_history=true - the backend preserves interleaved conversation state across turns
/clear-historyresets both frontend history and backend interleaved state/stopstops the active request; for interleaved runs this also resets backend continuation state
This repo includes small example scripts for direct backend interaction:
examples/interleaved_request.pyexamples/asr_request.pyexamples/tts_request.pyexamples/reset_history.pyexamples/stop.py
Supported TTS voices:
uk_femaleuk_maleus_femaleus_male
Examples:
python examples/asr_request.py --audio-path /path/to/audio.wav
python examples/tts_request.py --input "Hello there" --voice uk_femalepython examples/interleaved_request.py --audio-path /path/to/audio.wav
python examples/interleaved_request.py --audio-path /path/to/audio.wav --text "Keep it short." --include-chat-history
python examples/interleaved_request.py --audio-path /path/to/audio.wav --no-include-chat-history
python examples/reset_history.py
python examples/stop.pyOptional:
python examples/asr_request.py --board-ip 192.168.1.10 --audio-path /path/to/audio.wav
python examples/tts_request.py --board-ip 192.168.1.10 --input "Hello there" --voice us_malepython examples/interleaved_request.py --board-ip 192.168.1.10 --audio-path /path/to/audio.wav
python examples/reset_history.py --board-ip 192.168.1.10
python examples/stop.py --board-ip 192.168.1.10