Skip to content

Commit f6b7e89

Browse files
Release v0.1.1
1 parent 1dda40a commit f6b7e89

File tree

7 files changed

+2073
-5
lines changed

7 files changed

+2073
-5
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,42 @@
1-
# Ai-coustics Plugins for LiveKit
1+
# Ai-coustics Audio Enhancement Plugin for Python
2+
3+
Python [LiveKit](https://livekit.io) plugin for [Ai-coustics](https://ai-coustics.com) audio enhancement, providing real-time noise filtering and audio quality improvement for LiveKit audio streams.
4+
5+
## Installation
6+
7+
```bash
8+
pip install livekit-plugins-ai-coustics
9+
```
10+
11+
Or using `uv`:
12+
13+
```bash
14+
uv add livekit-plugins-ai-coustics
15+
```
16+
17+
## Requirements
18+
19+
- Python >= 3.9
20+
- livekit >= 0.21.4
21+
22+
## Usage
23+
24+
### LiveKit Agents Framework
25+
26+
The plugin integrates seamlessly with the LiveKit Agents framework by providing an audio enhancement processor that can be configured on the RoomIO:
27+
28+
```python
29+
from livekit.agents import RoomIO
30+
from livekit.plugins import ai_coustics
31+
32+
async def entrypoint(ctx: JobContext):
33+
await ctx.connect()
34+
35+
# Configure RoomIO with AI-coustics noise cancellation
36+
room_io = RoomIO(
37+
noise_cancellation=ai_coustics.audio_enhancement()
38+
)
39+
40+
# Use the room_io for your agent tasks
41+
...
42+
```

pyproject.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ requires = ["setuptools>=61.0", "wheel"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "audio-filter-uniffi"
9-
version = "0.1.0"
8+
name = "livekit-plugins-ai-coustics"
9+
version = "0.1.1"
10+
description = "LiveKit AI Coustics noise filtering plugin"
11+
readme = "README.md"
1012
requires-python = ">=3.9"
13+
dependencies = ["livekit>=0.21.3"]
14+
keywords = ["webrtc", "realtime", "audio", "livekit", "ai-coustics"]
15+
license = { text = "SEE LICENSE IN https://livekit.io/legal/terms-of-service" }
1116

1217
[tool.setuptools]
1318
package-dir = { "" = "src" }
@@ -16,12 +21,11 @@ package-dir = { "" = "src" }
1621
where = ["src"]
1722

1823
[tool.setuptools.package-data]
19-
audio_filter_uniffi = ["*.so", "*.dylib", "*.dll"]
24+
"livekit.plugins.ai_coustics._ffi" = ["*.so", "*.dylib", "*.dll"]
2025

2126
[tool.cibuildwheel]
2227
build = "cp39-*"
2328
skip = "*-musllinux_*"
24-
before-build = "python download_lib.py --skip"
2529
repair-wheel-command = ""
2630

2731
# Image selection
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright © 2025 LiveKit, Inc. All rights reserved.
2+
# Proprietary and confidential.
3+
4+
from typing import Optional
5+
from .plugin import AICousticsAudioEnhancer, AudioFilterModel, VadSettings, FRAME_USERDATA_AIC_VAD_ATTRIBUTE
6+
7+
8+
def audio_enhancement(
9+
*,
10+
model: AudioFilterModel = AudioFilterModel.QUAIL_L,
11+
vad_settings: VadSettings = VadSettings(
12+
lookback_buffer_size=None,
13+
sensitivity=None,
14+
),
15+
):
16+
"""
17+
Implements a mechanism to apply [ai-coustics models](https://ai-coustics.com/) on audio data
18+
represented as `AudioFrame`s. In addition, each frame will be annotated with a
19+
FRAME_USERDATA_AIC_VAD_ATTRIBUTE `userdata` attribute containing the output of the aic vad model.
20+
"""
21+
return AICousticsAudioEnhancer(model=model, vad_settings=vad_settings)
22+
23+
24+
__all__ = [
25+
"audio_enhancement",
26+
"FRAME_USERDATA_AIC_VAD_ATTRIBUTE",
27+
"AudioFilterModel",
28+
"VadSettings",
29+
]

0 commit comments

Comments
 (0)