Skip to content

Gate audio/ElevenLabs dependencies behind a voice feature flag #26

Description

@devfire

🔊 AUDIO DEPENDENCIES ARE MANDATORY AND NON-PORTABLE

Location: Cargo.toml:25-27

Problem

elevenlabs_rs = "0.6.0"
alsa-sys = "0.3.1"
alsa = "0.10.0"

These are unconditional dependencies, required to build even when --voice is off.

Issues

  • The build requires ALSA dev libraries (libasound2-dev) even for headless / non-voice deployments.
  • They lock the build to Linux — the project will not compile on macOS or Windows.
  • The README states ALSA is "Optional: ALSA development libraries for audio playback (Linux)", but Cargo.toml makes it mandatory. The docs and the manifest disagree.

Suggested Fix

Gate the voice stack behind a cargo feature so it is opt-in:

[features]
voice = ["dep:elevenlabs_rs", "dep:alsa", "dep:alsa-sys"]

[dependencies]
elevenlabs_rs = { version = "0.6.0", optional = true }
alsa = { version = "0.10.0", optional = true }
alsa-sys = { version = "0.3.1", optional = true }

Then cfg!(feature = "voice")-gate LLMModule::say / the elevenlabs_client field.

Priority: Medium — portability/build-friction issue that blocks non-Linux and CI usage.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions