Comments (5)
Thanks, I can add this! The code is indeed in rhasspy3
but I haven't pushed it up just yet. I'm making a lot of changes quickly, so I don't want to break anyone depending on the Github repo just yet 😄
from rhasspy3.
I pushed the code up to a side branch for now: https://github.com/rhasspy/rhasspy3/tree/wyoming-v1
from rhasspy3.
I would very much like to submit the following change against the current wyoming release.
From: Martin Weinelt <[email protected]>
Date: Wed, 12 Jul 2023 19:05:54 +0200
Subject: [PATCH] Use urlparse for uri parsing in server component
Python's builtin urlparsing functionality has fewer edge cases, like
most home-grown url parsing code.
This change allows me to bind a wyoming server to an IPv6 socket.
---
wyoming/server.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/wyoming/server.py b/wyoming/server.py
index 6dcc4e3..f3905b9 100644
--- a/wyoming/server.py
+++ b/wyoming/server.py
@@ -4,6 +4,7 @@ from abc import ABC, abstractmethod
from functools import partial
from pathlib import Path
from typing import Callable, Set, Union
+from urllib.parser import urlparse
from .event import Event, async_get_stdin, async_read_event, async_write_event
@@ -57,16 +58,15 @@ class AsyncServer(ABC):
@staticmethod
def from_uri(uri: str) -> "AsyncServer":
- if uri.startswith("unix://"):
- socket_path = uri[len("unix://") :]
- return AsyncUnixServer(socket_path)
+ result = urlparse(uri)
- if uri.startswith("tcp://"):
- host, port_str = uri[len("tcp://") :].split(":")
- port = int(port_str)
- return AsyncTcpServer(host, port)
+ if result.scheme == "unix":
+ return AsyncUnixServer(result.path)
- if uri.startswith("stdio://"):
+ if result.scheme == "tcp":
+ return AsyncTcpServer(result.hostname, result.port)
+
+ if result.scheme == "stdio":
return AsyncStdioServer()
raise ValueError("Only 'stdio://', 'unix://', or 'tcp://' are supported")
--
2.41.0
from rhasspy3.
Thanks Michael,
I hope this branch leads to being able to setup Rhasspy 3 as a satellite speaker for Home Assistant.
from rhasspy3.
@KeithSBB Yep, that's what a lot of the new code is for 🙂
from rhasspy3.
Related Issues (20)
- Custom wake word support HOT 3
- write() failed: Broken pipe HOT 2
- Pipeline seems to randomly hang after loading the wav2txt model HOT 4
- handle_adapter_text.py only supports one line of the response text
- suggestion: save and reuse conversation_id
- suggestion: simultaneous tts and snd
- [Question] Faster-Whisper Home Assistant GPU or Tensor (Coral) Suport? HOT 8
- suggestion: detect language using asr
- Enhancement: allow piper to use any of the voices available in libritts
- Outputting sound after wake word (satellite) HOT 1
- Docker image: non-ASCII characters in voice name trigger UnicodeEncodeError
- Add support for CUDA in piper HOT 1
- Suggestion: continuously listen to the wake word
- Timeout or lockup after "rhasspy3.vad:segment: speaking ended" with longer reply HOT 2
- Multi-Channel Audio Input Issues
- Pipeline that sends a feeback message after the wake word HOT 1
- Request: missing SDIST on Pypi or matching tag for 1.4.0 on Github, for easier Integration in Gentoo Overlay
- Adding whisper instead of faster-whisper as stt HOT 1
- Suggestion: Allow handle program to initiate conversations
- The `wyoming-v1` branch HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rhasspy3.