🎙️ Voice Assistant: Mambo Acoustic Engine & Command Reference

JuJu Music integrates on-device, offline wake-word detection: the wake word "Mambo" is detected locally by a 33KB ONNX model, so waking the assistant needs no network. After a wake-up, commands are recognized by one of two engines:

  • System engine: delegated to the speech-recognition service provided by Android or the device manufacturer. The UI offers "System default" plus any auto-detected specific engines (listed by app name); if the system default points to an unavailable service or a manufacturer stub, the app automatically falls back to an available engine and shows which one it actually used. Whether the service uses the network and uploads the recording is up to the engine you select; the app neither controls nor stores it.
  • LLM engine (formerly "online recognition"): the app records on-device, encodes the clip to WAV in memory, and sends it directly to the AI provider you configured (Google Gemini / OpenAI / OpenRouter / Alibaba Cloud Bailian) for transcription. A network connection and your own API key are required; release builds do not write the recording to disk.

⚡ 1. 'Mambo Era' Bilingual Wake Word Engine

  • Dedicated Wake Word: "Mambo" (or Chinese "曼波")
  • Compact Model: a 33KB ultra-lightweight ONNX acoustic model kept in memory with a very low memory and CPU footprint.
  • Foreground only: wake-word detection runs only while the app is in the foreground — it pauses automatically when the app goes to the background or the screen turns off (a deliberate tradeoff: re-creating the audio pipeline in the background makes playing music stutter) and resumes as soon as you return to the app. The persistent notification says "Wake-up paused — return to the app to use it" while paused; use the notification's playback controls meanwhile.
  • Multi-Frame Decision & Anti-Jitter (these are the values the current build actually uses):
    • Standard confirmation: at least 3 frames ≥ 0.65 in the last 400ms window, with the current frame ≥ 0.60;
    • High-saturation confirmation: at least 2 frames ≥ 0.65, window average ≥ 0.50, peak ≥ 0.85;
    • Cooldown: 1.5 seconds after a wake-up, to suppress re-triggers from vocals or song tails;
    • Feature warm-up: after a wake-up or a track change the engine needs to rebuild about 2.6 seconds of acoustic features (76 mel frames + 16 embedding frames). Wake-up cannot fire during this warm-up — this is a real limitation of the current implementation. A track change also suppresses wake-up for about 1.2 extra seconds, so after a track change wake-up is unavailable for roughly 3.8 seconds in total.

📖 2. Local Commands Dictionary (common list)

Once a recognition result matches a phrase below, the command executes locally on-device — no LLM parsing and no LLM key are needed, and it responds immediately after recognition. Whether recognition itself uses the network depends on the engine you choose: the system engine is up to the system/manufacturer, and the LLM engine requires a network.

Note: "zero delay" refers to command dispatch. Waking the assistant itself still requires roughly 240ms or more of continuous speech (see the multi-frame confirmation above), and the recognition time itself depends on the engine you use (system speech service or LLM provider) and the network.

The list below covers the common phrasings; the matcher also recognizes more synonyms (including colloquial forms ending in "吧", e.g. "下一首吧" / "切歌吧") and absolute volume commands with a number such as "set volume to 50".

Colloquial phrasings also run locally (since 2026-11): wake word and politeness words ("Mambo, next song", "please pause for a moment"), fillers and measure words ("暂停一下", "下一首歌"), and volume degree words ("声音大一点") are all normalized first. English gets the same treatment: "next one", "skip this", "pause the music", "stop playing", "turn it up", "a bit louder", "lower the volume", "favorite this song", "show the lyrics", "what song is playing", "whats the time" (apostrophes optional) all run locally. But as soon as the sentence names an object (song, artist, playlist, or a genre outside the whitelist) it goes to the LLM — local matching never guesses ("play some rock", "play a slow song for a rainy day", "play it again" are all LLM).

1. Playback & Track Skipping

  • Next Track: "next", "skip", "play next", "下一首", "下一首吧", "切歌", "切歌吧", "换歌吧"
  • Previous Track: "previous", "play previous", "last song", "上一首", "上一首吧", "倒回去"
  • Pause / Stop: "pause", "stop", "暂停", "暂停吧", "别放了"
  • Resume / Play: "play", "resume", "播放", "继续播放"

2. Playback Modes

  • Shuffle Mode: "shuffle", "random", "随机播放", "随机模式"
  • Single Repeat: "repeat one", "loop single", "单曲循环", "单曲模式"
  • List Repeat: "repeat all", "loop list", "列表循环", "全部循环"

3. Volume Control

  • Volume Up: "volume up", "louder", "turn up", "大点声", "音量加"
  • Volume Down: "volume down", "quieter", "turn down", "小点声", "音量减"
  • Mute / Unmute: "mute", "silence", "静音", "闭嘴" / "unmute", "取消静音", "恢复声音"
  • Set Volume Directly: "set volume to 50", "volume 80%", "音量调到 50", "音量设为 80"

4. Genre & Favorites

  • Genre & Scene Requests: "play rock", "play jazz", "play pop", "play chill", "workout", "play classic", "听摇滚", "放点放松的", "来点健身的" (also accepts "播放摇滚歌曲"-style suffixes; tags match bilingually and the spoken tag follows the reply language)
  • Song title wins over tag: if your library literally has a song named like the tag word (e.g. a song called 《孤独》, or Happy), saying 播放孤独 / "play happy" plays that song instead of filtering by mood/genre — no more "no songs found" while the song is right there.
  • Favorites: "like", "favorite", "add favorite", "add to favorites", "收藏", "喜欢这首歌"
  • Time & Query: "what time is it", "what song is this", "这是什么歌", "报时"; colloquial forms "现在是什么时间", "报个时" also run locally (since 2026-11)

5. Queue & Library

  • Clear Queue: "clear queue", "清空队列", "清空播放队列"
  • Remove from Queue: "remove from queue", "移出队列", "把这首歌移出队列"
  • Rescan Library: "rescan", "rescan library", "重新扫描", "重新扫描曲库"

6. Screen & Assistant Control

  • Show Lyrics: "lyrics", "show lyrics", "open lyrics", "看歌词"
  • Return to the Main Screen: "home", "main screen", "back to home", "go home", "打开主界面", "返回主页", "回到首页"
  • Open the Player Screen: "player screen", "show player", "open player", "now playing", "播放界面", "打开播放界面"
  • Turn Off the Assistant: "turn off voice assistant", "close voice assistant", "disable voice assistant", "exit voice assistant", "关闭语音助手", "退出语音助手"

7. Requires the LLM (not local; API key + network)

  • Play by song/artist: "play Qing Tian by Jay Chou", "play a slow song for a rainy day"
  • Add/remove a song or artist to/from the queue: "add all Jay Chou songs to the queue"

To skip tracks, use "next" / "play next" / "下一首" — these are local commands; no song name, network, or LLM is needed.

These four navigation targets have no matching voice Action yet — Settings / cloud drives / equalizer / playlists: the local matcher will not fire, and the LLM replies that it is not supported instead of pretending to perform it.


🌐 3. Language Policy

The assistant separates three layers: the UI language, the voice assistant language, and the language you speak in this turn.

Item Follows Notes
UI copy In-app language The "App language" setting; e.g. an English system with the app set to Chinese.
Voice Assistant Language (Settings → AI → top of Speech Recognition) System / Chinese / English Only affects the system engine's recognition language and the preferred TTS language. Defaults to "System". The LLM engine detects Chinese and English from the prompt, so it does not read this setting; when the text cannot be classified (e.g. digits only), the reply language also falls back to this setting.
Local replies / LLM prompt / AI reply / TTS text The language you speak this turn (auto-detected) Chinese in → Chinese out; English in → English out. Mixed input uses the dominant language: Han characters vs. English words, ties go to Chinese.
Tag matching & spoken tags Both Chinese and English Library fields may be Chinese (「摇滚」) or English (Rock); the spoken tag follows the reply language (a Chinese reply says 「摇滚」, an English reply says rock).
LLM engine recognition language Chinese / English auto-detected The prompt detects Chinese and English (mixed input allowed); the reply language follows the language you speak this turn.

Examples:

  • English system + Voice Assistant Language "System", you say "play rock" → English reply and English playback.
  • English system + Voice Assistant Language "Chinese", you say "来首安静的歌" → system STT is forced to Chinese, reply in Chinese.
  • Chinese system + Voice Assistant Language "English", you say "play some rock" → recognition / playback prefer English, reply in English.
  • Mixed input: "播放 Lemon Tree" is classified as Chinese (2 Han characters vs. 2 English words; ties go to Chinese) → Chinese reply, while tag matching can still use English song names. The assistant explains the cost before enabling wake-up: the toolbox switch is the only entry for wake-up, and it shows the battery and false-wake notice every time. If you only want occasional voice control, you never need to turn it on — double-tap the JuJu title to wake it manually (on a tablet in landscape, the voice button at the bottom of the left rail is also available).

🎚️ 4. Hardware Audio Enhancement & AEC Tuning

Go to Settings → AI: AEC lives under the Voice Wake-up section and Silence Detection Level under Speech Recognition. These two are the only tunable acoustic settings; the rest run automatically:

  • Hardware Acoustic Echo Cancellation (AEC):
    • Choose "Hardware(Comm)": while the speaker is playing loud music, the hardware removes the song's echo from the microphone, greatly improving wake-word success rates while music is playing.
  • Hardware Noise Suppressor (NoiseSuppressor) & Automatic Gain Control (AGC) — enabled automatically, no switch:
    • The app tries to attach both every time it initializes the audio chain (AGC is skipped in call-source mode to avoid double gain); whether they actually take effect depends on the device's hardware/driver support.
    • They filter fan airflow and car engine noise, improving far-field pickup clarity.
  • Silence Detection Level (adaptive noise floor):
    • The LLM engine records at most 8 seconds per utterance; after you stop speaking, about 1 second of silence cuts the recording automatically, so a normal request never waits the full 8 seconds.
    • The UI offers only Low / Standard / High (no numbers are shown): lower levels cut the recording sooner after you stop speaking, while higher levels require louder speech, are less likely to be interrupted by background noise, and may run longer. Use Low in quiet environments and High in noisy ones.
    • The thresholds are not fixed absolute amplitudes — they adapt to the current noise floor (computed dynamically), so you never need to tune a number when you change device or environment.

🤖 5. Optional LLM Semantic Intent Parsing

For complex requests (e.g., "Play a soothing acoustic track for a rainy evening"), open Settings → AI → API Keys, and paste the API key for the provider you use. The app supports Alibaba Bailian (qwen3.8-flash for chat), OpenAI (chat gpt-6-luna, online speech gpt-transcribe; GPT-6 family only), OpenRouter (same models, openai/gpt-6-luna and gpt-transcribe, with its own key and a fixed endpoint), and Google Gemini (the gemini-flash-latest alias, which Google keeps pointed at its newest flash model). DeepSeek is temporarily withdrawn (its code and key are kept for when it supports speech). There is no model-name field: the model is preset and switches automatically if a model is retired.

OpenAI supports a custom API base (default api.openai.com): point it at a self-hosted gateway or relay, including a path prefix such as https://gateway.example.com/openai/v1; a malformed address is rejected before saving. OpenRouter's endpoint is fixed and needs no input.

Bailian (Alibaba Cloud) API keys are region-specific: a Beijing key only works with the Beijing host, a Singapore key only with the Singapore host — a mismatch is reported as an invalid API key. The default follows the build: Google Play builds use the Singapore host, official builds use Beijing. If your key belongs to the other region, paste the API Host shown in the Bailian console into the same LLM API Key section (e.g. xxx.ap-southeast-1.maas.aliyuncs.com); leave it empty to use the default host.