Skip to content
alkove-aiPublic

About

On-device voice models and SDK: voice isolation, wake words, voice activity and voiceprints. In the browser (WebAssembly), Python, Android and iOS, with plugins for LiveKit Agents, Pipecat and Home Assistant (ESPHome, Wyoming). No server, no key. Apache-2.0 code and weights.

Topics

Resources

Contributing

Security policy

Stars

82 stars

Watchers

1 watching

Forks

Repository files navigation

Alkove

On-device voice models and SDK

Voice isolation, wake words, voice activity and voiceprints, on the device.
In the browser, in Python, on Android and on iOS. No server, no key, no telemetry.

npm PyPI Android iOS Apache-2.0, code and weights Models on Hugging Face

Try it on your voice · Docs · Android · iOS · React Native · LiveKit Agents · Pipecat · Home Assistant


A living room: the assistant takes a typed name, ignores the TV and a guest, hears its user four metres away, waits through a pause, stops only when its user interrupts, all on the device

The five models on one scene: a typed wake word, your voice only, your turns only. Try it on your voice.

Why Alkove

  • The other voices stay out. On meetings recorded on headset microphones (AMI), words from other people reaching the transcript drop from 17 per minute to 2.3. Denoisers let 19 or more through.
  • Far voices stay out without a voiceprint. With near, a colleague across the room or a video on another device opens no turn: it goes by loudness against the user's own voice, nothing biometric.
  • Any word is a wake word. Type it in one of 7 languages: no training, no recording session. 80 % recall at one false alarm per hour.
  • Fewer false barge-ins. Behind Focus, Cue starts on music 4× less often than Silero VAD.
  • Small enough for a phone. Five models in 9.1 MB together, Focus at 2.3 MB, an engine of 185 KB (brotli).
  • Open. Code and weights under Apache-2.0, the engine is Alkove's own, in Rust. Every number above comes with its datasets and protocol in bench/.

Quick start

In the browser

npm install alkove
import { createCallInput } from 'alkove'

const input = await createCallInput()
pc.addTrack(input.track) // only the user's voice goes out
import { createWakeListener, Spot } from 'alkove'

const word = await Spot.compile('Hey Nova', { lang: 'en' })
const wake = await createWakeListener({ words: [word] })
wake.on('wake', ({ audio }) => startListening(audio))

Voice agents, files, Node and the primitives: the alkove package. With React, useAgentInput, useCallInput and useWakeListener from alkove/react: the React guide.

On Android

// settings.gradle.kts: repositories { maven("https://maven.alkove.ai") }
implementation("ai.alkove:alkove:0.5.0")
val input = AgentInput.start(context, AgentOptions(output = Output(Format.S16, rate = 24000))) { chunk ->
    socket.send(chunk) // only the user's voice goes out
}

Wake words, files, a LiveKit room (ai.alkove:alkove-livekit): the Android quick start.

On iOS and macOS

.package(url: "https://github.com/alkove-ai/alkove.git", from: "0.5.0")
let input = try await AgentInput.start(AgentOptions(output: Output(format: .s16, rate: 24000))) { chunk in
    socket.send(chunk) // only the user's voice goes out
}

Wake words, files, a LiveKit room (alkove-livekit-swift): the iOS quick start.

On React Native

npm install @alkove/react-native
const { status } = useAgentInput({ enabled: talking, on: { utterance: ({ pcm }) => transcribe(pcm) } })

The hooks of alkove/react on the native SDKs, Expo plugin included. Wake words, a LiveKit room (@alkove/react-native-livekit): the React Native quick start.

LiveKit Agents

pip install livekit-plugins-alkove
from livekit.plugins import alkove

session = AgentSession(vad=alkove.VAD.load(), ...)
await session.start(
    agent,
    room=ctx.room,
    room_options=room_io.RoomOptions(
        audio_input=room_io.AudioInputOptions(noise_cancellation=alkove.Focus()),
    ),
)

Pipecat

pip install pipecat-alkove
from pipecat_alkove import AlkoveFilter, AlkoveVADAnalyzer

params = TransportParams(audio_in_enabled=True, audio_in_filter=AlkoveFilter())
vad = AlkoveVADAnalyzer()

Home Assistant

Typed wake words on an ESP32-S3, in place of micro_wake_word (the ESPHome component):

alkove_spot:
  microphone: my_microphone
  words:
    - text: ok Nabu
      lang: en
  on_wake_word_detected:
    - voice_assistant.start:
        wake_word: !lambda return wake_word;

On a satellite, in place of openWakeWord (the Wyoming server):

pip install wyoming-alkove
wyoming-alkove --uri tcp://0.0.0.0:10400 --word "ok nabu" --word "fr:salut maison" --zeroconf

Python on its own: pip install alkove, see the Python package.

The five models

Model What it does Size
Focus Keeps the closest voice, or one person's voice from their print, and removes noise, music and other voices 2.3 MB
Cue Tells when someone speaks, every 30 ms, and when their turn ends 1.2 MB
Spot Hears any word you type, in 7 languages, with no training 2.8 MB
Lex Turns a written word into its likely pronunciations 1.8 MB
Timbre Makes voiceprints and compares them 0.97 MB

Weights on Hugging Face, downloaded once, checked by sha256 and cached. In production, host them yourself.

Read this first

  • A near microphone, one person. A phone, a headset, a laptop in front of you. Alkove keeps the closest voice and removes the others: on a room microphone in the middle of a meeting table, it removes the other participants too.
  • 16 kHz voice. The output carries speech up to 8 kHz: HD voice, not full band.
  • Preview (0.x). A minor version may break the API until 1.0, a patch never does. See the changelog.

In this repository

packages/alkove the web library (npm)
python the Python package (PyPI)
android the Android library and its LiveKit plugin (maven.alkove.ai)
ios the Swift package (iOS, macOS), its LiveKit plugin and an example app
integrations/livekit Focus and Cue for LiveKit Agents
integrations/pipecat Focus and Cue for Pipecat
crates/engine the inference engine and the .alk format
crates/core the features, written once in Rust for every package
bench every benchmark number, with its datasets and protocol
examples two React apps (Next.js, Vite) and two plain HTML pages

Building from source: CONTRIBUTING.md.

Help and custom models

Integrating Alkove into your app or agent, or need a model trained for your own use? Write to me through alkove.ai/contact. Bugs and questions about the SDK go to issues.

License

Apache-2.0, code and weights. See LICENSE and NOTICE.

About

On-device voice models and SDK: voice isolation, wake words, voice activity and voiceprints. In the browser (WebAssembly), Python, Android and iOS, with plugins for LiveKit Agents, Pipecat and Home Assistant (ESPHome, Wyoming). No server, no key. Apache-2.0 code and weights.

Topics

Resources

Contributing

Security policy

Stars

82 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages