SEPIA-Framework / sepia-stt-server

SEPIA server to support open-source speech recognition via WebSocket connection.
MIT License
116 stars 21 forks source link

Issue Python Kaldi bindings #3

Closed ownrich closed 2 years ago

ownrich commented 3 years ago

Thanks for the great project. I have installed OpenHAB. Sepia on a raspberry pi and am looking to add the STT server, I have issue when I want to echo and Wget the repo-ai from goofy.zamia.org. It says permission denied. When I try to reach the repo-ai from an url I receive: You don't have permission to access /repo-ai/ on this server. How can I possibly fix this? I know it must be a quite sample issue to resolve but am very interested in the whole concept of home-host decentralized home automation and voice assistant. Thank you if you can help, and great job. Keep the good work.

ownrich commented 3 years ago

Just saw that there is also the docker download. Will try this instead and update.

ownrich commented 3 years ago

When I try to docker run sepia/stt-server:beta2.1, on the raspberry pi4, with openHABian platform. I get this error: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested.

I tried to force by adding: --platform linux/arm/v7

I get: docker: Error response from daemon: image with reference sepia/stt-server:beta2.1 was found but does not match the specified platform: wanted linux/arm/v7, actual: linux/amd64.

Is there a way around this? Thank you.

mawoka-myblock commented 3 years ago

Yea there is no arm image, only a amd64 image so it only supports 64-bit

ownrich commented 3 years ago

Yea there is no arm image, only a amd64 image so it only supports 64-bit

Thank you, hence it can not work on my actual raspberry OpenHABian setup, right?

mawoka-myblock commented 3 years ago

I think so but maybe there is other stt which works! In the past I found one which was very small with storage and worked great! I'll post it here if I find it again

ownrich commented 3 years ago

Ok thank you for the answer. Hopefully I can find a solution, will update here if I do.

mawoka-myblock commented 3 years ago

https://alphacephei.com/vosk/ That's the program I meant!

ownrich commented 3 years ago

https://alphacephei.com/vosk/ That's the program I meant!

Thank you for your time. I was able to install vosk. When I try to start docker kaldi aka: docker run -d -p 2700:2700 alphacep/kaldi-en:latest It says unable to find image alphacep/kaldi-en:latest latest: Pulling from alphacep/kaldi-en download 3G or something The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested.

Do you know how could I force arm/v7 image to be downloaded instead of the amd64 one?

Have a great day

nshmyrev commented 3 years ago

Do you know how could I force arm/v7 image to be downloaded instead of the amd64 one?

For arm v7 you need to install python3 package with pip, not with docker:

  pip3 install vosk

docker on arm is not so lightweight thing.

ownrich commented 3 years ago

Do you know how could I force arm/v7 image to be downloaded instead of the amd64 one?

For arm v7 you need to install python3 package with pip, not with docker:

  pip3 install vosk

docker on arm is not so lightweight thing.

Perfect, thank you. I was able to download and vosk seems to be working fine. I will check the videos in the vosk documentation. When I understand how Vosk works, will the integration with SEPIA be quite easy? I'm new to linux and servers. Thank you again.

nshmyrev commented 3 years ago

will the integration with SEPIA be quite easy

If you have the questions let me know, we'll try to solve

mawoka-myblock commented 3 years ago

I only wrote vosk because I tried it with mycroft and it worked great and it makes me happy to hear it also works with sepia!

ownrich commented 3 years ago

Ok perfect, to be more precise, at this point I have SEPIA, openHAB and Vosk installed. If I understand well, I have to create a local host tunnel for Vosk and then go in the SEPIA setthing and configure ASR engine to use the tunnel previously created. This mean I should install and make an account at Ngrok. Is it right? Thank you.

mawoka-myblock commented 3 years ago

Isn't everything on the same machine?

-------- Original Message -------- On 31 Mar 2021, 18:08, ownrich < @.***> wrote:

Ok perfect, to be more precise, at this point I have SEPIA, openHAB and Vosk installed. If I understand well, I have to create a local host tunnel for Vosk and then go in the SEPIA setthing and configure ASR engine to use the tunnel previously created. This mean I should install and make an account at Ngrok. Is it right? Thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.AP2BMZWXDQH3CHUHTR54JMLTGNCGJA5CNFSM4Z6GLYVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGBM3QXI.gif

ownrich commented 3 years ago

Isn't everything on the same machine? -------- Original Message --------

Yes, everything is on a raspberry pi

mawoka-myblock commented 3 years ago

But why do you think you need ngrok?

ownrich commented 3 years ago

I am simply following the SEPIA-STT tutorial. I want to link Vosk and SEPIA and I though it meant to use ngrok. Actually, since it is on the same local environment, I might not need ngrok. How would I like both instances together if I don't need ngrok at all?

mawoka-myblock commented 3 years ago

I am simply following the SEPIA-STT tutorial. I want to link Vosk and SEPIA and I though it meant to use ngrok. Actually, since it is on the same local environment, I might not need ngrok. How would I like both instances together if I don't need ngrok at all?

Set instead of the ngrok url only localhost and the port

ownrich commented 3 years ago

I don't think I will be able to implement my out TTS server. Everything I seem to try is not working. I don't know half of what I do too. I'm too much of a beginner to do this without a step guide.

mawoka-myblock commented 3 years ago

@fquirin can you help?

ownrich commented 3 years ago

@fquirin can you help?

I have no trouble setting up SEPIA and Openhab to work together. It's mainly when I want to decentralize and offline the STT server. My issue is that I am never able to reach or create the STT on a port like the SEPIA-STT seems to be doing. I have no problem to use vosk from the localhost instance but I don't know how to start the STT server. I tried

https://github.com/alphacep/vosk-server coupled with vosk-api. I don't know if I should use websocket, mqtt webrtc or grpc. Even if I knew which server instance to use, I do not know how to properly setup and start it. I've tried to add the required library for websocket then cd to vosk-server/websocket and execute python3 asr-server.py but got no luck.. I receive either missing library or grammar errors. (no idea if this is what I should have done too)

nshmyrev commented 3 years ago

I tried to install vosk-api but without luck

To get help on this you need to provide exact error messages you see

ownrich commented 3 years ago

I tried to install vosk-api but without luck

To get help on this you need to provide exact error messages you see

Thank you for your time. I tried: https://github.com/alphacep/vosk-server coupled with vosk-api. I don't know if I should use websocket, mqtt webrtc or grpc. Even if I knew which server instance to use, I do not know how to properly setup and start it. I've tried to add the required library for websocket then cd to vosk-server/websocket and execute python3 asr-server.py but got no luck.. I receive either missing library or grammar errors. (no idea if this is what I should have done too)

am I doing the good thing would be a good start because I am not sure this is the way to go.

nshmyrev commented 3 years ago

I don't know if I should use websocket, mqtt webrtc or grpc

You can use websocket.

ownrich commented 3 years ago

I don't know if I should use websocket, mqtt webrtc or grpc

You can use websocket.

Ok perfect. To initiate and start the server, running python3 asr-server.py is the good thing to do?

nshmyrev commented 3 years ago

running python3 asr-server.py is the good thing to do?

You also need to download and unpack the model

ownrich commented 3 years ago

running python3 asr-server.py is the good thing to do?

You also need to download and unpack the model

Ok perfect, should it be unpacked at a precis location? vosk-server or vosk-api folder ?

own-rich commented 3 years ago

For anyone looking for an alternative, there is rhasspy that seems to do the work and work on raspberry pi.

fquirin commented 3 years ago

Hi, sorry for the late reply, I'm currently using all my free time to work on the next update and haven't been checking the issues section as much as I should :grimacing:. I've rebuilt large parts of the client audio interface and I'm happy to say that integration of new speech recognition features will become much easier very soon. Vosk support will come either together with the update or shortly after @nshmyrev @own-rich :slightly_smiling_face: to finally realize the long promised RPi4 STT server ^^.

dolomiti70 commented 3 years ago

I've been trying to install either Zamia or Kaldi-asr to support the Sepia Framework SST. Sadly I haven't been able to get them to work as the links no longer work, and the name of the packages seems to have changed and possibly not supported anymore? Any information that could steer me in the right direction would be helpful Your documentation to install Kaldi-asr with custom-install is not up-to-date.

fquirin commented 3 years ago

Hi @dolomiti70

It is true, the old packages cannot be installed anymore :-(. The good news is that the improved replacement server is on its way and right now I'm working on the compatibility of the old and new interface. In the meantime if you are running an x86 64bit system (amd64) you can try the Docker container that is still available for the "old" server: DockerHUB SEPIA STT.

dolomiti70 commented 3 years ago

Thanks for the information. I´m not so familiar with docker but i will give it a try.

fquirin commented 2 years ago

The new STT server is available for a while now, the SEPIA client has been updated to fully support it and Docker containers are available for x86_64, Arm32 and aarch64 :slightly_smiling_face:. If you need to convert your old Kaldi model please check this script.