-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Thanks] #54
Comments
Thanks for the kind words, glad to see it's proving a useful resource 🎉 That change looks strange, because it seems the moment you don't have a message immediately available it will exit the receiving loop and then it will go to the cleanup logic and should disconnect after that. I would expect that code to disconnect more and cause more issues 🤔 If you can share more details of the crashes I can look into it |
Great thanks, will try to collect some details and compile a fresh clone the next days. |
OK, got it reproducible. I am running it on Windows 11. I did a fresh clone today, followings simply the example commands on the main page here. Opened 2 Terminal Windows running these commands: resulting in client error:
And if setting the log level to Debug or Trace, the client process never finishes. |
So if the server hasn't bound to the port by the time the client starts you'll get an error like that. Can you wait until |
I can't reproduce it on Linux and don't have a windows machine unfortunately Hmmm the stop message in the client is set to In linux we get a close frame etc and everything is fine, but maybe that's not the case in windows or the windows impl handles it a bit worse 🤔 One way you can solve this is - as you're using the simple endpoint you can keep a track of the end time and when it's within so much of the file duration (to account for potential rounding errors), just ignore any errors from the Rust. If you were using the segmented one you could use the I'll make a note to double check some of the websocket stuff, if I go through and update to latest axum and tungstenite I guess there's a chance it might go away there's been some changes on both 👀 |
Yes, that is what I thought.
I of course already tried to search the internet for the error and I found other reports of it, but the only "solution" was the one I showed at the beginning. But it is not so easy. It just doesn't feel good to not know what the real problem is there and what the proper handling would be. looks interesting: |
As I found out that tungstenite doesn't support proxies, I added this now: and let it run through Burp proxy ... and ... no crash 🤣 Looks like a timing problem, if I set the client and server to If I set it to: No crash. If you want to add proxy support, especially for debugging, it works.
|
Commenting out the trace here also prevents it to crash: streamer-template/src/bin/client.rs Line 49 in 2287c6c
|
As there is Diskussions are not enabled, I thought I "abuse" the Issues to say: Thank you!
I just play around at home currently and wanted to see how far I get using rust to get:
As I already have the last thing (automate) running since longer time but using Alexa, custom skill and AWS, I thought, let's see what is out there to have all running local and best all in rust. (I am not really good with rust, but I still like it).
I first found the more or less abandoned sonos snips-nlu project, but I really got everything compiled and running in the end.
Then I found vosk and also got it compiled and running.
The last missing thing was I wanted to have a websocket server that receives audio and translates it into text that can be used to get intents out of it.
This is where I found your posts and this repository.
Today I successfully integrated (or injected) Vosk into your already existing audio receiving here:
streamer-template/src/axum_server.rs
Line 163 in ec2586c
collecting the incoming data and use the WavWriter to recreate the audio file in memory.
reuse your audio decoding sample recreation code and could get Vosk to extract words out of the audio data (using https://ttsmp3.com/ to generate spoken text and using audacity to export the mp3 as Wav). 🚀
For developing I have all compiled under windows and plan to compile it later for armv7-unknown-linux-musleabihf.
I had some crashes / disconnects with the client I think here:
streamer-template/src/bin/client.rs
Line 151 in ec2586c
and modified it to this and had no crashes anymore, but don't know if this is any good:
The text was updated successfully, but these errors were encountered: