danijel3 / KaldiWebrtcServer

Python server for communicating with Kaldi from the browser using WebRTC
Apache License 2.0
67 stars 37 forks source link

Waiting for client... #4

Closed alkazap closed 4 years ago

alkazap commented 4 years ago

Hello, I can't figure out what am I doing wrong. I can't get your web demo to work without using docker images. I'm on Ubuntu 18.04 (with Python 3.6.9), using Chromium Web Browser. My setup is supposed to be identical to your docker files.

Any idea what could be the reason? I'll attach all the logs below. Thanks in advance.

server

======== Running on https://0.0.0.0:20005 ========
(Press CTRL+C to quit)
[2020-05-25 16:50:22,946] aiohttp.access <INFO> 127.0.0.1 [25/May/2020:07:50:22 +0000] "GET / HTTP/1.1" 200 1771 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36"
[2020-05-25 16:50:22,971] aiohttp.access <INFO> 127.0.0.1 [25/May/2020:07:50:22 +0000] "GET /static/styles.css HTTP/1.1" 200 479 "https://0.0.0.0:20005/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36"
[2020-05-25 16:50:22,981] aiohttp.access <INFO> 127.0.0.1 [25/May/2020:07:50:22 +0000] "GET /static/client.js HTTP/1.1" 200 4683 "https://0.0.0.0:20005/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36"
[2020-05-25 16:50:22,986] aiohttp.access <INFO> 127.0.0.1 [25/May/2020:07:50:22 +0000] "GET /static/kaldi_logo.png HTTP/1.1" 200 41172 "https://0.0.0.0:20005/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36"
[2020-05-25 16:50:23,033] aiohttp.access <INFO> 127.0.0.1 [25/May/2020:07:50:23 +0000] "GET /favicon.ico HTTP/1.1" 404 172 "https://0.0.0.0:20005/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36"
[2020-05-25 16:50:32,319] ice <INFO> Connection(0) Check CandidatePair(('192.168.0.187', 54795) -> ('192.168.0.187', 58026)) State.FROZEN -> State.WAITING
[2020-05-25 16:50:32,319] ice <INFO> Connection(0) Check CandidatePair(('fec0:1::5ff:1818:def1:3909', 52926) -> ('fec0:1::5ff:1818:def1:3909', 40038)) State.FROZEN -> State.WAITING
[2020-05-25 16:50:32,319] ice <INFO> Connection(0) Check CandidatePair(('fec0:1::cb74:6406:ceba:ea7c', 47849) -> ('fec0:1::5ff:1818:def1:3909', 40038)) State.FROZEN -> State.WAITING
[2020-05-25 16:50:32,320] ice <INFO> Connection(0) Check CandidatePair(('192.168.0.187', 54795) -> ('192.168.0.187', 58026)) State.WAITING -> State.IN_PROGRESS
[2020-05-25 16:50:32,320] web <INFO> Connected to Kaldi server localhost:5050...
[2020-05-25 16:50:32,321] aiohttp.access <INFO> 127.0.0.1 [25/May/2020:07:50:32 +0000] "POST /offer HTTP/1.1" 200 2157 "https://0.0.0.0:20005/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) snap Chromium/83.0.4103.61 Chrome/83.0.4103.61 Safari/537.36"
[2020-05-25 16:50:32,322] ice <INFO> Connection(0) Check CandidatePair(('192.168.0.187', 54795) -> ('192.168.0.187', 58026)) State.IN_PROGRESS -> State.SUCCEEDED
[2020-05-25 16:50:32,341] ice <INFO> Connection(0) Check CandidatePair(('fec0:1::5ff:1818:def1:3909', 52926) -> ('fec0:1::5ff:1818:def1:3909', 40038)) State.WAITING -> State.IN_PROGRESS
[2020-05-25 16:50:32,346] ice <INFO> Connection(0) Check CandidatePair(('fec0:1::5ff:1818:def1:3909', 52926) -> ('fec0:1::5ff:1818:def1:3909', 40038)) State.IN_PROGRESS -> State.SUCCEEDED
[2020-05-25 16:50:32,347] ice <INFO> Connection(0) Check CandidatePair(('fec0:1::cb74:6406:ceba:ea7c', 47849) -> ('fec0:1::5ff:1818:def1:3909', 40038)) State.WAITING -> State.FAILED
[2020-05-25 16:50:32,347] ice <INFO> Connection(0) ICE completed

_online2_tcp_nnet3_decodefaster

/home/alena/kaldi/src/online2bin/online2-tcp-nnet3-decode-faster --mfcc-config=/home/alena/data/models/streaming/exp/chain_rvb/tdnn1n_rvb_online/conf/mfcc.conf --ivector-extraction-config=/home/alena/data/models/streaming/exp/chain_rvb/tdnn1n_rvb_online/conf/ivector_extractor.conf --frames-per-chunk=20 --extra-left-context-initial=0 --min-active=200 --max-active=7000 --beam=15.0 --lattice-beam=6.0 --acoustic-scale=1.0 --endpoint.silence-phones=1:2:3:4:5:6:7:8:9:10 --chunk-length=0.2 --port-num=5050 --samp-freq=16000 /home/alena/data/models/streaming/exp/chain_rvb/tdnn1n_rvb_online/final.mdl /home/alena/data/models/streaming/exp/chain_rvb/tree_a/graph_tgsmall/HCLG.fst /home/alena/data/models/streaming/exp/chain_rvb/tree_a/graph_tgsmall/words.txt 
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:ComputeDerivedVars():ivector-extractor.cc:204) Done.
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 1 orphan nodes.
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 2 orphan components.
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:Collapse():nnet-utils.cc:1472) Added 1 components, removed 2
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:CompileLooped():nnet-compile-looped.cc:345) Spent 0.020118 seconds in looped compilation.
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:Listen():online2-tcp-nnet3-decode-faster.cc:389) TcpServer: Listening on port: 5050
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:Accept():online2-tcp-nnet3-decode-faster.cc:403) Waiting for client...
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:Accept():online2-tcp-nnet3-decode-faster.cc:422) Accepted connection from: 127.0.0.1
WARNING (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:ReadChunk():online2-tcp-nnet3-decode-faster.cc:451) Stream over...
LOG (online2-tcp-nnet3-decode-faster[5.5.697~1-79790]:Accept():online2-tcp-nnet3-decode-faster.cc:403) Waiting for client...

webclient:

:20005/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
client.js:51 v=0
o=- 7335280967440572680 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS f2Boi5mjI9HUXp13aFT0HXZ10RU6b7DVcvfi
m=audio 58026 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 192.168.0.187
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3534240702 1 udp 2122260223 192.168.0.187 58026 typ host generation 0 network-id 1
a=candidate:312762591 1 udp 2122187263 fec0:1::5ff:1818:def1:3909 40038 typ host generation 0 network-id 2
a=candidate:2620114766 1 tcp 1518280447 192.168.0.187 9 typ host tcptype active generation 0 network-id 1
a=candidate:1546099759 1 tcp 1518207487 fec0:1::5ff:1818:def1:3909 9 typ host tcptype active generation 0 network-id 2
a=ice-ufrag:JDS0
a=ice-pwd:DGsK493N7+qaaDoDDpc86J+T
a=ice-options:trickle
a=fingerprint:sha-256 00:53:B9:6D:17:D9:1B:A7:57:B8:6A:BB:01:B7:08:3C:23:0E:1D:B2:AD:1F:D2:23:7D:80:49:B8:B3:35:95:1C
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:f2Boi5mjI9HUXp13aFT0HXZ10RU6b7DVcvfi 16c168d7-bb9e-44d5-af48-083d52f4402d
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:718321399 cname:fVPRvfp20LnS42fV
a=ssrc:718321399 msid:f2Boi5mjI9HUXp13aFT0HXZ10RU6b7DVcvfi 16c168d7-bb9e-44d5-af48-083d52f4402d
a=ssrc:718321399 mslabel:f2Boi5mjI9HUXp13aFT0HXZ10RU6b7DVcvfi
a=ssrc:718321399 label:16c168d7-bb9e-44d5-af48-083d52f4402d
m=application 41011 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 192.168.0.187
a=candidate:3534240702 1 udp 2122260223 192.168.0.187 41011 typ host generation 0 network-id 1
a=candidate:312762591 1 udp 2122187263 fec0:1::5ff:1818:def1:3909 54221 typ host generation 0 network-id 2
a=candidate:2620114766 1 tcp 1518280447 192.168.0.187 9 typ host tcptype active generation 0 network-id 1
a=candidate:1546099759 1 tcp 1518207487 fec0:1::5ff:1818:def1:3909 9 typ host tcptype active generation 0 network-id 2
a=ice-ufrag:JDS0
a=ice-pwd:DGsK493N7+qaaDoDDpc86J+T
a=ice-options:trickle
a=fingerprint:sha-256 00:53:B9:6D:17:D9:1B:A7:57:B8:6A:BB:01:B7:08:3C:23:0E:1D:B2:AD:1F:D2:23:7D:80:49:B8:B3:35:95:1C
a=setup:actpass
a=mid:1
a=sctp-port:5000
a=max-message-size:262144

client.js:65 v=0
o=- 3799381832 3799381832 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic:WMS *
m=audio 54795 UDP/TLS/RTP/SAVPF 111 0 8
c=IN IP4 192.168.0.187
a=recvonly
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=mid:0
a=msid:4ba6e709-7be7-41c1-9802-e051d00b04cf 83afb08c-a834-4606-a644-263c5d571605
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-mux
a=ssrc:3938142756 cname:2261fb71-251b-4a9b-be99-5032f6253ac3
a=rtpmap:111 opus/48000/2
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=candidate:9423bef4cfcc3192610fbd8172d4ee92 1 udp 2130706431 192.168.0.187 54795 typ host
a=candidate:00aa5f6846094859d2c1c6c178db7bb2 1 udp 2130706431 fec0:1::5ff:1818:def1:3909 52926 typ host
a=candidate:d4f7b767d19ac5e1a8478710b0a1451d 1 udp 2130706431 fec0:1::cb74:6406:ceba:ea7c 47849 typ host
a=candidate:f5d377bd7da58ddbbb1be970a7c16452 1 udp 1694498815 61.75.36.69 54795 typ srflx raddr 192.168.0.187 rport 54795
a=end-of-candidates
a=ice-ufrag:He0b
a=ice-pwd:CBbmhQQPiNLEHzq7kpuAZm
a=fingerprint:sha-256 DD:6A:9E:15:70:5C:E8:9C:F3:5A:96:0E:5D:DC:B6:12:77:57:21:A6:65:D5:43:84:B4:3F:F9:CD:2C:F1:AB:56
a=setup:active
m=application 54795 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 192.168.0.187
a=mid:1
a=sctp-port:5000
a=max-message-size:65536
a=candidate:9423bef4cfcc3192610fbd8172d4ee92 1 udp 2130706431 192.168.0.187 54795 typ host
a=candidate:00aa5f6846094859d2c1c6c178db7bb2 1 udp 2130706431 fec0:1::5ff:1818:def1:3909 52926 typ host
a=candidate:d4f7b767d19ac5e1a8478710b0a1451d 1 udp 2130706431 fec0:1::cb74:6406:ceba:ea7c 47849 typ host
a=candidate:f5d377bd7da58ddbbb1be970a7c16452 1 udp 1694498815 61.75.36.69 54795 typ srflx raddr 192.168.0.187 rport 54795
a=end-of-candidates
a=ice-ufrag:He0b
a=ice-pwd:CBbmhQQPiNLEHzq7kpuAZm
a=fingerprint:sha-256 DD:6A:9E:15:70:5C:E8:9C:F3:5A:96:0E:5D:DC:B6:12:77:57:21:A6:65:D5:43:84:B4:3F:F9:CD:2C:F1:AB:56
a=setup:active

client.js:94 Opened data channel
client.js:118 Disconnected
alkazap commented 4 years ago

Never mind, figured it out Basically problem was related to python version To run server.py without changes on Ubuntu 18.04, one must install Python 3.7:

apt-get update && apt-get install -y python3.7
python3.7 -m pip install -U pip
python3.7 -m pip install aiortc aiohttp numpy
danijel3 commented 4 years ago

Oh, thanks! Is this something I can address in this project or is it an issue with some of the libraries?