Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
dc86b32
add(event): events to serialize and deserialize
Popochounet Jan 5, 2026
44680ff
evol(module): now use ModuleEvent
Popochounet Jan 5, 2026
4859fd0
evol(modules): use of ModuleEvent
Popochounet Jan 5, 2026
4b90c4a
wip(command): add CommandEvent (is not received yet)
Popochounet Jan 14, 2026
8438ee9
evol(control_channel): dealer register with auth(wip) then start
Popochounet Jan 15, 2026
29079c1
evol(agent): thread is now inside zmq classes
Popochounet Jan 15, 2026
31c8fb1
fix(core): agent and huri now exit cleanly
Popochounet Jan 15, 2026
3ad3368
evol(events): update events naming
Popochounet Jan 15, 2026
97f949d
wip(control_channel): huri can handle control
Popochounet Jan 22, 2026
9c2e564
remove(archi): old deprecated archi files
Popochounet Mar 16, 2026
2ac1433
refacto(module): is now a basic processor with one input and output type
Popochounet Mar 16, 2026
d6eae24
feat(session+EventGraph): has an EventGraph that connects modules and…
Popochounet Mar 16, 2026
efe6cf8
refacto(huri): huri is now a fastapi ray server, launching ray deploy…
Popochounet Mar 16, 2026
90b6d01
evol(launch_huri): launch deployement and bind them to main ray serve…
Popochounet Mar 16, 2026
3d6936c
wip(client): connect to huri via websocket, stream audio and receive …
Popochounet Mar 16, 2026
047a655
evol(MIC+STT): changes for new archi
Popochounet Mar 16, 2026
78513e9
add(Sender): module that sends huri output to client
Popochounet Mar 16, 2026
48e750b
remove(logger): deprecated logger
Popochounet Mar 16, 2026
4bc4b6b
feat(linter): added linter config file + Makefile (make lint)
Popochounet Mar 16, 2026
d5071e1
fix(linter): make lint
Popochounet Mar 16, 2026
06334b7
remove(config): deprecated config files + quick_launch.sh
Popochounet Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,6 @@ cython_debug/

# PyPI configuration file
.pypirc

# Others
.trash
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
lint:
black .
isort .
flake8 .
mypy .

test:
pytest

check: lint test
34 changes: 0 additions & 34 deletions config/agent_input.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions config/agent_io.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions config/huri.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[tool.black]
line-length = 88
target-version = ["py310"]

[tool.isort]
profile = "black"
line_length = 88
multi_line_output = 3
include_trailing_comma = true
skip_gitignore = true

[tool.flake8]
max-line-length = 88
extend-ignore = []
exclude = """
__pycache__
venv
.venv
"""

[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
strict_optional = true
warn_unused_ignores = true
warn_return_any = true
warn_unused_configs = true

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
40 changes: 0 additions & 40 deletions quick_launch.sh

This file was deleted.

7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
black
isort
mypy
flake8
flake8-toml-config
pytest

deepfilternet
sounddevice
soundfile
Expand Down
45 changes: 45 additions & 0 deletions src/client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import asyncio

import numpy as np
import sounddevice as sd
import websockets

SERVER_URL = "ws://localhost:8000/session"
CHUNK_DURATION = 1
SAMPLE_RATE = 16000


async def stream_audio():

async with websockets.connect(SERVER_URL) as ws:
print("Connected to server")

async def receive(ws: websockets.ClientConnection):
while True:
text = await ws.recv()
print("received:", text)

async def send(ws: websockets.ClientConnection):
loop = asyncio.get_running_loop()

queue: asyncio.Queue = asyncio.Queue()

def callback(indata: np.ndarray, frames, time, status):
loop.call_soon_threadsafe(queue.put_nowait, indata.copy())

with sd.InputStream(
samplerate=SAMPLE_RATE,
channels=1,
dtype="int16",
callback=callback,
blocksize=int(CHUNK_DURATION * SAMPLE_RATE),
):
while True:
chunk = await queue.get()
await ws.send(chunk.tobytes())

await asyncio.gather(receive(ws), send(ws))


if __name__ == "__main__":
asyncio.run(stream_audio())
Loading