Giter Club home page Giter Club logo

Comments (4)

KoljaB avatar KoljaB commented on August 13, 2024

I am no unix expert, maybe anybody can help? Quite sure it's not an issue with the lib, but more the environment. Sry cant help better other than provide what gpt says, maybe it helps.

from realtimestt.

UniversalTechno avatar UniversalTechno commented on August 13, 2024

yes for sure its not about library , its common issue in linux

from realtimestt.

markyfsun avatar markyfsun commented on August 13, 2024

Same here

ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave

Also find similar issue here: dosbox-staging/dosbox-staging#2821

Environment:

  • Ubuntu 22.04
  • RTX 3090
  • CUDA 12.3
  • The microphone and earphone have two separate slots on my computer; I use an adapter cable to connect a headset with a microphone.
aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Still working on resolution.

from realtimestt.

markyfsun avatar markyfsun commented on August 13, 2024

By setting level=logging.DEBUG, I found that the root cause is about DLL:

RealTimeSTT: root - INFO - Starting RealTimeSTT
RealTimeSTT: root - INFO - Initializing faster_whisper main transcription model tiny
RealTimeSTT: root - INFO - Initializing faster_whisper realtime transcription model tiny
RealTimeSTT: root - INFO - Initializing audio recording (creating pyAudio input stream)
ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
RealTimeSTT: root - DEBUG - Audio recording (pyAudio input stream) initialized successfully
RealTimeSTT: urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443
RealTimeSTT: urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): huggingface.co:443
RealTimeSTT: urllib3.connectionpool - DEBUG - https://huggingface.co:443 "GET /api/models/Systran/faster-whisper-tiny/revision/main HTTP/1.1" 200 1836
RealTimeSTT: urllib3.connectionpool - DEBUG - https://huggingface.co:443 "GET /api/models/Systran/faster-whisper-tiny/revision/main HTTP/1.1" 200 1836
RealTimeSTT: root - DEBUG - Faster_whisper realtime speech to text transcription model initialized successfully
RealTimeSTT: root - INFO - Initializing WebRTC voice with Sensitivity 3
RealTimeSTT: root - DEBUG - WebRTC VAD voice activity detection engine initialized successfully
RealTimeSTT: root - DEBUG - Faster_whisper main speech to text transcription model initialized successfully
RealTimeSTT: torchaudio._extension - DEBUG - Failed to initialize sox extension
Traceback (most recent call last):
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/__init__.py", line 60, in <module>
    _init_sox()
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/utils.py", line 70, in _init_sox
    _load_lib("libtorchaudio_sox")
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/utils.py", line 64, in _load_lib
    torch.ops.load_library(path)
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torch/_ops.py", line 852, in load_library
    ctypes.CDLL(path)
  File "/home/markyfsun/anaconda3/envs/Bert-VITS2/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libsox.so: cannot open shared object file: No such file or directory
RealTimeSTT: torchaudio._extension.utils - DEBUG - Attempting to load FFmpeg version 6.
RealTimeSTT: torchaudio._extension.utils - DEBUG - Failed to load FFmpeg 6 extension.
Traceback (most recent call last):
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/utils.py", line 128, in _find_ffmpeg_extension
    return _find_versionsed_ffmpeg_extension(ffmpeg_ver)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/utils.py", line 113, in _find_versionsed_ffmpeg_extension
    _try_access_avutil(ffmpeg_ver)
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/utils.py", line 89, in _try_access_avutil
    torchaudio.lib._torchaudio.find_avutil(libavutil)
RuntimeError: Error in dlopen: libavutil.so.58: cannot open shared object file: No such file or directory
Exception raised from DynamicLibrary at ../aten/src/ATen/DynamicLibrary.cpp:38 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x57 (0x7f24c49a5617 in /home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torch/lib/libc10.so)
frame #1: <unknown function> + 0x109413c (0x7f24a689413c in /home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #2: torchaudio::find_avutil(char const*) + 0x1a (0x7f24428404ca in /home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/lib/libtorchaudio.so)
frame #3: <unknown function> + 0x6f8e (0x7f244936ff8e in /home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/lib/_torchaudio.so)
frame #4: <unknown function> + 0x11847 (0x7f244937a847 in /home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/lib/_torchaudio.so)
frame #5: python() [0x525f07]
<omitting python frames>
frame #8: python() [0x5c82ce]
frame #10: python() [0x5e1623]
frame #11: python() [0x51c107]
frame #14: python() [0x524a53]
frame #17: python() [0x566270]
frame #18: python() [0x51c107]
frame #21: python() [0x524a53]
frame #25: python() [0x5c82ce]
frame #27: python() [0x5e1623]
frame #28: python() [0x51c107]
frame #31: python() [0x524a53]
frame #35: python() [0x5c82ce]
frame #37: python() [0x5e1623]
frame #38: python() [0x51c107]
frame #41: python() [0x524a53]
frame #45: python() [0x5c82ce]
frame #47: python() [0x5e1623]
frame #48: python() [0x51c107]
frame #54: python() [0x53ca72]
frame #57: python() [0x5c82ce]
frame #59: python() [0x5e8807]
frame #60: python() [0x5e4e40]
frame #61: python() [0x5f9132]

RealTimeSTT: torchaudio._extension.utils - DEBUG - Attempting to load FFmpeg version 5.
RealTimeSTT: torchaudio._extension.utils - DEBUG - Failed to load FFmpeg 5 extension.
Traceback (most recent call last):
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/utils.py", line 128, in _find_ffmpeg_extension
    return _find_versionsed_ffmpeg_extension(ffmpeg_ver)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/utils.py", line 113, in _find_versionsed_ffmpeg_extension
    _try_access_avutil(ffmpeg_ver)
  File "/home/markyfsun/.cache/pypoetry/virtualenvs/parrot-patter-Y87L2jnJ-py3.11/lib/python3.11/site-packages/torchaudio/_extension/utils.py", line 89, in _try_access_avutil
    torchaudio.lib._torchaudio.find_avutil(libavutil)
RuntimeError: Error in dlopen: libavutil.so.57: cannot open shared object file: No such file or directory
......

It seems that on Linux, RuntimeErrors are ommited unless setting log level to DEBUG.

from realtimestt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.