slackr31337 / porcupinepipeline Goto Github PK
View Code? Open in Web Editor NEWUse Porcupine wake word to trigger a voice assistant pipeline in Home-Assistant
License: MIT License
Use Porcupine wake word to trigger a voice assistant pipeline in Home-Assistant
License: MIT License
This might be beyond the scope of this project but integrating this with open AI functions could make this very powerful. It could also provide a way to interface with home assistant devices.
For other language support, it would be useful to support the --keyword-paths and --model-path arguments as Environment Variables. And linking Volumes with these files.
I think this idea would be really cool, but if it isn't inline with the direction of this project, then I can close this and work on a personal fork.
Idea: The initial pipeline could be the Assist pipeline, then if the response is Sorry, I couldn't understand that
then you could call a second OpenAI pipeline that could handle the input. Calling the Home assistant Assist pipeline first would allow actions to be executed, but still also have the ability to converse in natural language with ChatGPT. One way to enhance the performance is to have the first pipeline only be STT and Assist and the second pipeline only ChatGPT and TTS.
Would it be possible to implement this as a custom integration inside HA?
Hi!
I get a ConnectionResetError: Cannot write to closing transport error message when I pronounce the wake word and approximately 1 minute of inactivity elapsed after the last tts response was received. I believe this is because of the websocket has been closed.
I am using windows 11. Here is the stacktrace:
2023-07-20 23:51:01,355 INFO Waiting for wake word to trigger audio
2023-07-20 23:52:44,837 INFO Detected keyword `alexa`
2023-07-20 23:52:45,016 INFO Listening and sending audio to voice pipeline
Traceback (most recent call last):
File "c:\Users\User\projects\PorcupinePipeline-main\voice_pipeline.py", line 489, in <module>
asyncio.run(main())
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "c:\Users\User\projects\PorcupinePipeline-main\voice_pipeline.py", line 136, in main
await loop_pipeline(state)
File "c:\Users\User\projects\PorcupinePipeline-main\voice_pipeline.py", line 236, in loop_pipeline
await websocket.send_json(pipeline_args)
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_ws.py", line 165, in send_json
await self.send_str(dumps(data), compress=compress)
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\client_ws.py", line 151, in send_str
await self._writer.send(data, binary=False, compress=compress)
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\http_websocket.py", line 690, in send
await self._send_frame(message, WSMsgType.TEXT, compress)
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\http_websocket.py", line 646, in _send_frame
self._write(header + mask + message)
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\aiohttp\http_websocket.py", line 663, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
While troubleshooting audio in my container, I ran into a Picovoice error:
AccessKey *** has reached it's [sic] temporary device limit
It looks like each execution counts as a unique user to Picovoice, so I have to wait a month until trying again. Would this be worth mentioning in the readme?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.