codeforequity-at / botium-speech-processing

Botium Speech Processing
https://www.botium.at
MIT License
945 stars 58 forks source link

HTTP 200 error code on /dictate API endpoint #5

Closed abhinavkulkarni closed 3 years ago

abhinavkulkarni commented 4 years ago

Hi,

Firstly, thanks for your efforts!

I seem to have all the requisite containers running:

$ docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS                NAMES
71c1ef071742        botiumspeechprocessing_frontend   "/bin/sh -c 'npm sta…"   37 minutes ago      Up 8 seconds        56000/tcp            botiumspeechprocessing_frontend_1
ac5b093ba5a8        botiumspeechprocessing_tts        "/bin/sh -c ./marytts"   37 minutes ago      Up 2 seconds        59125/tcp            botiumspeechprocessing_tts_1
3e43c78a63fc        botiumspeechprocessing_dictate    "docker-entrypoint.s…"   37 minutes ago      Up 6 seconds        56100/tcp            botiumspeechprocessing_dictate_1
93b06574ac09        botiumspeechprocessing_stt_de     "/usr/bin/supervisord"   37 minutes ago      Up 5 seconds        80/tcp               botiumspeechprocessing_stt_de_1
15199910a926        botiumspeechprocessing_watcher    "/usr/bin/supervisord"   37 minutes ago      Up 6 seconds                             botiumspeechprocessing_watcher_1
26689b50571c        botiumspeechprocessing_stt_en     "/usr/bin/supervisord"   37 minutes ago      Up 9 seconds        80/tcp               botiumspeechprocessing_stt_en_1
7256a8ac9e27        nginx                             "nginx -g 'daemon of…"   37 minutes ago      Up 3 seconds        0.0.0.0:80->80/tcp   botiumspeechprocessing_nginx_1

However, http://127.0.0.1/dictate URL autocompletes to http://127.0.0.1/dictate/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/mob.html while giving HTTP 200.

Please note, /api/stt/en seems to work fine with a wav file.

Thanks!

codeforequity-at commented 4 years ago

Please get the latest version, rebuild the dictate-container and restart:

git pull
docker-compose build dictate
docker-compose up -d
abhinavkulkarni commented 4 years ago

@codeforequity-at: I still have the same problem.

Thanks!

codeforequity-at commented 4 years ago

What happens if you directly navigate to this url: http://127.0.0.1/dictate/demos/mob.html

By the way, if you are using Chrome, this definitly won't work, as it requires HTTPS to enable the microfone in the browser

k5gde commented 4 years ago

Hi,

I just installed botium-speech-processing and do have the same issue. Using http://127.0.0.1/dictate/demos/mob.html also redirects me to http://127.0.0.1/dictate/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/demos/mob.html

I am using Firefox. Accessing the tss and stt services via the Swagger UI works perfectly though.

Thanks for making this available to the public @codeforequity-at . This is an awesome project 👍

codeforequity-at commented 4 years ago

what happens when you point your browser to the demo environment: https://speech.botiumbox.com/dictate/

k5gde commented 4 years ago

It works without any issues if I use your demo environment :) On my machine it does not work however. I actually tested on two machines with the same result.

codeforequity-at commented 4 years ago

I found the problem and fixed it. Please pull the latest changes and restart nginx container (docker-compose restart nginx), that should do.

k5gde commented 4 years ago

Thanks :) It does solve part of the problem. I can now access the dictate demo if I use the full url: 127.0.0.1/dictate/demos/mob.html

Using 127.0.0.1/dictate wrongly redirects me to 127.0.0.1/demos/mob.html however which only gets me: Cannot GET /demos/mob.html

Unfortunatly though the dictate demo does not seem to work on my local machine. I always get an error after stopping recording. It's either "Could not determine type of stream." or "No valid frames decoded before end of stream" Both errors are followed by: ERR: 4: Server error: 5: Unknown error

I can rule out that the errors are caused by a badly setup microphone as the demo you provided (https://speech.botiumbox.com/dictate/) still works. I can test the demo on a different machine tomorrow to see if that works.

Btw: When accessing the dictate demo from a different machine in the same network the redirection works correctly now but I get the following error when I'm trying to use it:

ERR: 3: Recorder undefined
ERR: 5: No user media support
msg: 1: Waiting for approval to access your microphone ...

I'm assuming this is caused by missing encryption (using http instead of https)

codeforequity-at commented 4 years ago

When using it from a remote server you will need https, at least when using Chrome. With Firefox it works without https.

k5gde commented 3 years ago

Hi, sorry for not getting back to you for such a long time.

I just retried this today and the redirection from 127.0.0.1/dictate to 127.0.0.1/dictate/demos/mob.html now works for me. I can also use the dictate demo without any issues on localhost.

I think this issue can be closed.