Skip to main content

alkove

On-device voice input for Python: keep the user's voice and drop the rest (Focus), find where they speak (Cue), hear a wake word typed in 11 languages (Spot, Lex), know who is speaking (Timbre). It runs natively on the CPU, one thread per stream. No server, no key, no telemetry.

The core is the one the web SDK runs in WebAssembly: for the same 16 kHz audio, the output is the same to the bit.

Preview (0.x). A minor version may break the API until 1.0; a patch never does.

Read this first. Alkove is made for a near microphone and one person: a phone, a headset, a laptop, a caller on a line. It keeps the user's voice, from a print it learns or one you give, and removes the others. Audio is processed at 16 kHz: the output carries speech up to 8 kHz.

Install

pip install alkove

Wheels for Linux (x86-64, aarch64), macOS and Windows, Python 3.9 and later. numpy is the only dependency.

Models

import alkove

models = alkove.Models.load(["focus", "cue"])             # Hugging Face at this version's revision, then the cache
models = alkove.Models.load(["focus", "cue"], dir="models")  # a folder of .alk files, nothing on the network

Each file is checked against the sha256 this version pins; a file that does not match raises AlkoveError with the code models.hash. alkove.fetch() downloads them ahead, alkove.cache_dir() says where they go. Load them once: a Models is shared by every stream, in any thread.

A stream

p = alkove.Processor(models, focus=True, cue=True, rate=48000)
for frame in frames:              # float32 or int16 numpy arrays, any length
    part = p.push(frame)
    send(part.audio)              # 16 kHz, the user's voice only
    for s in part.speech:         # Speech(start, end), seconds from the stream's start
        ...
last = p.end()

The output comes back aligned with the input: the first part.audio is shorter by the chain's delay (16 ms), and end() gives it back. push releases the GIL: streams in several threads run on several cores.

Options, the same as the web SDK's Alkove.process:

focus=True Focus with a print learned from the audio: process takes it from the recording first, Processor as the audio comes
voiceprint= keep that voice, Focus on without focus=True: an alkove.Voiceprint, or a few seconds of the user alone at 16 kHz (its print, and Focus's sample)
strength= 0 gives the raw mic back, 1 Focus's output (default)
cue= None (default): speech found behind Focus; True: Cue on its own without Focus; False: no speech
speech=alkove.SpeechParams(...) confidence, exit_confidence, start_secs, stop_secs
normalize=True bring the voice to a steady level
trace=True Focus's level every 16 ms and Cue's probability every 30 ms, in part.trace
rate= the rate of what push takes; the output is always 16 kHz
words=, context= the words Spot listens for, and where they count: "anywhere" (default), "pause", "both"

A wake word

models = alkove.Models.load(["spot", "lex"], langs=["fr"])   # Spot's top and Lex for each language of the words
lex = alkove.Lex(models)
word = lex.compile("Camille", "fr")          # any word in fr, en, es, it, pt, ca, ro, de, nl, pl, sv; or alkove.compile("/kamij/") without Lex
store(word.to_json())                        # bound to this version's Spot: alkove.Word.from_json gives None for another one

listener = alkove.Listener(models, [word])   # after a pause, by default; context="anywhere" or "both"
for frame in mic:                            # 16 kHz
    for heard in listener.push(frame):       # one every 30 ms
        for wake in heard.wakes:             # {word, score, threshold, context, start, end}
            ...

Processor(..., words=[word]) and process(..., words=[word]) find the words too, behind Focus when it is on: part.wakes. alkove.Enroller(models, word) sets a word's thresholds on the user's own voice from three takes (push the audio, then result()). lex.phonemize("amendement", "fr") gives the likeliest pronunciations, alkove.Lex.distance(a, b) how far two of them are.

A voice

models = alkove.Models.load(["timbre", "focus", "cue"])
timbre = alkove.Timbre(models)
me = timbre.embed(pcm)                                   # 1.5 s of voice or more
same, score = alkove.Timbre.verify(me, timbre.embed(other))
p = alkove.Processor(models, voiceprint=me)              # Focus keeps that voice from the start, instead of learning a print

alkove.VoiceprintLearner(models).offer(pcm) learns a print from the user's speech, window by window, as the web SDK's inputs do: a window joins only if it sounds like the others. A print is bound to this version's Timbre: alkove.Voiceprint.from_json gives None for another one.

A file

r = alkove.process(models, pcm, rate=44100, focus=True, cue=True)
r.audio    # as long as the input, at 16 kHz
r.speech   # [Speech(start, end)]

Real time, hop by hop

chain = alkove.Chain(models, gate=True)          # 256 samples at 16 kHz per step
out, events = chain.step(hop)                     # events: speechstart, speechend, idle, diag
chain.set_voiceprint(me)                          # a Voiceprint or a recording, applied at the next hop

alkove.Resampler(48000, 16000) and alkove.resample(pcm, 44100, 16000) convert rates the way the core does.

License

Code and model weights: Apache-2.0. See NOTICE. The Apache license grants no right to the Alkove name or logo: a fork may not call itself Alkove.

Metadata

Release files for alkove 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alkove 0.6.0
File Size Uploaded Provenance Actions
alkove-0.6.0.tar.gz 263.8 kB With provenance Details for alkove-0.6.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for alkove 0.6.0
File Actions
alkove-0.6.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for alkove-0.6.0-cp39-abi3-win_amd64.whl
alkove-0.6.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for alkove-0.6.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
alkove-0.6.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for alkove-0.6.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
alkove-0.6.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for alkove-0.6.0-cp39-abi3-macosx_11_0_arm64.whl
alkove-0.6.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for alkove-0.6.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 4.0 MB

Release files / alkove-0.6.0.tar.gz

Download URL alkove-0.6.0.tar.gz
Size 263.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b7c59505a132cd8a9f7e0ac5e325e0f36f1c6c800f0d11bfe1f54773ba391cbb
BLAKE2b-256 checksum
How to use checksums
a935ad27ee33d3e45fd73385cc5a98ee0c9357167d8a3dbbfd5f26ab0f5b7d12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / alkove-0.6.0-cp39-abi3-win_amd64.whl

Download URL alkove-0.6.0-cp39-abi3-win_amd64.whl
Size 724.2 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8c6dc44ed4a6358059f65c113f0d760da773bb3521f39e757834112d9692e099
BLAKE2b-256 checksum
How to use checksums
efabee623042d964eae88bc41885f63e5aadd8247c247c745195e408db2dd053
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / alkove-0.6.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL alkove-0.6.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 777.5 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
de89205ac176e1d4025b3d4c88c2f1a28a48bf5677c296c9851c9c7accd45268
BLAKE2b-256 checksum
How to use checksums
56d01846d68c15edcf2fa77b9612a79b7f08fc4147e69f47b54f06983921dec6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / alkove-0.6.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL alkove-0.6.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 745.2 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e42fde5b22a8c83b6caeb7f70f03b66fbba15316af02f9be3b32a25f13d35a35
BLAKE2b-256 checksum
How to use checksums
c531a89ca0bf20ad2c737f2ce07eb0ac57c22f33a547b617baa01824b477a5fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / alkove-0.6.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL alkove-0.6.0-cp39-abi3-macosx_11_0_arm64.whl
Size 719.4 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
490d8ac4db6dbdaf776dd77aba97b5a5ca620376a982e887326c03b2523cc724
BLAKE2b-256 checksum
How to use checksums
aa486422de623f5bc915869eab0eafa962338b7a9b8d5d0e8ba239a7a54f1282
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / alkove-0.6.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL alkove-0.6.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 743.5 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
5ad484160800c77b2d75507726779a61049fdb1261ed48ac1bfb69e2af143315
BLAKE2b-256 checksum
How to use checksums
07136227c23ccad57b36dfe51d3d1429d29e16c0247e441174ec91ca59f8e34e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for alkove 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for alkove-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page