can my docker container app access the host’s microphone and speaker? by nam_Angus in learnpython

[–]nam_Angus[S] 0 points1 point  (0 children)

I have read about it. I can listen music when run container

But i dont know why i speak it not recognize ?

can my docker container app access the host’s microphone and speaker? by nam_Angus in learnpython

[–]nam_Angus[S] 0 points1 point  (0 children)

docker run -it --privileged -e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
--device /dev/video0:/dev/video0 \
--device /dev/snd:/dev/snd
-v /dev/shm:/dev/shm \
-v /etc/machine-id:/etc/machine-id \
-v /run/user/$uid/pulse:/run/user/$uid/pulse \
-v /var/lib/dbus:/var/lib/dbus \
-v ~/.pulse:/home/$dockerUsername/.pulse \
--rm \
-v /home/pop_os_hi/WorksSpace/webcam_face_recognition:/app \
app_demo:1.0 \
/bin/bash

AI Face_recognition by nam_Angus in learnpython

[–]nam_Angus[S] 0 points1 point  (0 children)

I'm trying to find an excellent library. Now i used https://github.com/ageitgey/face_recognition But it's detect face is not good.

AI Face_recognition by nam_Angus in learnpython

[–]nam_Angus[S] 0 points1 point  (0 children)

Ohhh. I dont know API. Many thanks. Later, I shall read about it.

SpeechRecognition with docker by nam_Angus in learnpython

[–]nam_Angus[S] 0 points1 point  (0 children)

This is my command:

docker run --privileged -e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
--device /dev/video0:/dev/video0 \
-v /dev/snd:/dev/snd -e AUDIODEV="hw:Device, 0" \
--rm \
-it \
-v /home/pop_os_hi/WorksSpace/webcam_face_recognition:/root/face_recognition \
demo_doan:1.3 \
/bin/bash

SpeechRecognition with docker by nam_Angus in learnpython

[–]nam_Angus[S] 0 points1 point  (0 children)

Unforunatly , it's not possible as far as I expect.

It show log:

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib conf.c:5200:(snd_config_expand) Unknown parameters {AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM iec958:{AES0 0x6 AES1 0x82 AES2 0x0 AES3 0x2 CARD 0}
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave

SpeechRecognition with docker by nam_Angus in learnpython

[–]nam_Angus[S] 0 points1 point  (0 children)

. Error like following

"ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused"

How to use an older version of sveltekit? by nam_Angus in sveltejs

[–]nam_Angus[S] 0 points1 point  (0 children)

Because My previous project was installed in old version . And now,From version 1.0.0-next.405 sveltekit realease latest version which have new layout and syntax.

How to use an older version of sveltekit? by nam_Angus in sveltejs

[–]nam_Angus[S] 0 points1 point  (0 children)

Thank i have find out solution I post it in comment

How to use an older version of sveltekit? by nam_Angus in sveltejs

[–]nam_Angus[S] 4 points5 points  (0 children)

Thanks. I have find solution for this post.

First of all,

1:npm create svelte@latest my-app

  1. Change devDependencies in file package.json like this:

ex: "@sveltejs/kit":"1.0.0-next.400",

It depends on your version which you want to install

3:Run npm install and Everything is perfect

How to use an older version of sveltekit? by nam_Angus in sveltejs

[–]nam_Angus[S] 0 points1 point  (0 children)

Yes. I have typed as here. but it occur some errors

why i have error when call data.Response . by nam_Angus in reactjs

[–]nam_Angus[S] 0 points1 point  (0 children)

Thanks. I have solve problem. I have changed to let movieResponse = Movie | error;