use async process function

This commit is contained in:
Corvin Jaedicke
2025-11-12 13:48:22 +01:00
parent eb36a1bc91
commit 3c76917c1e
3 changed files with 44 additions and 44 deletions

View File

@@ -17,7 +17,7 @@ classifiers = [
"Topic :: Communications :: Conferencing", "Topic :: Communications :: Conferencing",
"Topic :: Multimedia :: Sound/Audio", "Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Video", "Topic :: Multimedia :: Video",
"Topic :: Scientific/Engineering :: Artificial Intelligence" "Topic :: Scientific/Engineering :: Artificial Intelligence",
] ]
dependencies = [ dependencies = [
"aiofiles>=24.1.0,<25", "aiofiles>=24.1.0,<25",
@@ -45,7 +45,7 @@ Source = "https://github.com/pipecat-ai/pipecat"
Website = "https://pipecat.ai" Website = "https://pipecat.ai"
[project.optional-dependencies] [project.optional-dependencies]
aic = [ "aic-sdk~=1.0.1" ] aic = [ "aic-sdk~=1.1.0" ]
anthropic = [ "anthropic~=0.49.0" ] anthropic = [ "anthropic~=0.49.0" ]
assemblyai = [ "pipecat-ai[websockets-base]" ] assemblyai = [ "pipecat-ai[websockets-base]" ]
asyncai = [ "pipecat-ai[websockets-base]" ] asyncai = [ "pipecat-ai[websockets-base]" ]

View File

@@ -185,7 +185,7 @@ class AICFilter(BaseAudioFilter):
) )
# Process planar in-place; returns ndarray (same shape) # Process planar in-place; returns ndarray (same shape)
out_f32 = self._aic.process(block_f32) out_f32 = await self._aic.process_async(block_f32)
# Convert back to int16 bytes, planar layout # Convert back to int16 bytes, planar layout
out_i16 = np.clip(out_f32 * 32768.0, -32768, 32767).astype(np.int16) out_i16 = np.clip(out_f32 * 32768.0, -32768, 32767).astype(np.int16)

6
uv.lock generated
View File

@@ -36,12 +36,12 @@ wheels = [
[[package]] [[package]]
name = "aic-sdk" name = "aic-sdk"
version = "1.0.2" version = "1.1.0"
source = { registry = "https://pypi.org/simple" } source = { registry = "https://pypi.org/simple" }
dependencies = [ dependencies = [
{ name = "numpy" }, { name = "numpy" },
] ]
sdist = { url = "https://files.pythonhosted.org/packages/51/90/b02e853e863c303f8456c689b42ac24ad403b781adc9642d0a91ed4bed7e/aic_sdk-1.0.2.tar.gz", hash = "sha256:239097dd3aaa8a8a0fd7542b75d2510cb34144caec796370639b7c636acbc56e", size = 32059, upload-time = "2025-08-24T09:20:03.9Z" } sdist = { url = "https://files.pythonhosted.org/packages/99/83/bf38b95d98c67b8ebc574fb4a4f23c07a3740b51992d7522976173d30b98/aic_sdk-1.1.0.tar.gz", hash = "sha256:04e08df695581c8cb4db8acca20e73815e9f449e7bd08e0162fd55518c727963", size = 34954, upload-time = "2025-11-11T20:45:24.25Z" }
[[package]] [[package]]
name = "aioboto3" name = "aioboto3"
@@ -4647,7 +4647,7 @@ docs = [
[package.metadata] [package.metadata]
requires-dist = [ requires-dist = [
{ name = "accelerate", marker = "extra == 'moondream'", specifier = "~=1.10.0" }, { name = "accelerate", marker = "extra == 'moondream'", specifier = "~=1.10.0" },
{ name = "aic-sdk", marker = "extra == 'aic'", specifier = "~=1.0.1" }, { name = "aic-sdk", marker = "extra == 'aic'", specifier = "~=1.1.0" },
{ name = "aioboto3", marker = "extra == 'aws'", specifier = "~=15.0.0" }, { name = "aioboto3", marker = "extra == 'aws'", specifier = "~=15.0.0" },
{ name = "aiofiles", specifier = ">=24.1.0,<25" }, { name = "aiofiles", specifier = ">=24.1.0,<25" },
{ name = "aiohttp", specifier = ">=3.11.12,<4" }, { name = "aiohttp", specifier = ">=3.11.12,<4" },