SeaDve / Mousai

Identify songs in seconds
GNU General Public License v3.0
1.01k stars 38 forks source link

No audio detected #33

Closed ghost closed 3 years ago

ghost commented 3 years ago

image

Arch linux with most recent updates. I even installed a GNOME DE to see if Mousai can catch the sound there - still this issue. Maybe I need some kind of awkward sound mixer? I have those sound-related packages installed: alsa-utils, pulseaudio, pulseaudio-alsa and pavucontrol.

SeaDve commented 3 years ago

try changing preferred audio source in hamburger menu

ghost commented 3 years ago

try changing preferred audio source in hamburger menu

Of course I tried! It's still nothing =( I don't have a mic, btw - maybe this is an issue?

SeaDve commented 3 years ago

it gets the default audio source as stated in pactl info. So i think it should not matter

if you have gnome control center installed you can check the device there

ghost commented 3 years ago

it gets the default audio source as stated in pactl info. So i think it should not matter

if you have gnome control center installed you can check the device there

image Everything's fine, sound is being showed

ghost commented 3 years ago

it gets the default audio source as stated in pactl info. So i think it should not matter

if you have gnome control center installed you can check the device there

I reinstalled mousai a couple of times, rebooted a few times and now it's working, even though I never touched anything in my sound settings and never after installed any sound-related packages

SeaDve commented 3 years ago

that's really weird, may you show the output of pactl info? it may be helpful

ghost commented 3 years ago

that's really weird, may you show the output of pactl info? it may be helpful

Will it be an issue that it's in a different language? I can change my local and reboot, if it is an issue

Строка сервера: /run/user/1000/pulse/native Версия протокола библиотеки: 35 Версия протокола сервера: 35 Выполняется локально: да Номер клиента: 9 Размер блока памяти: 65472 Имя пользователя: anonymous Имя хоста: MyCompooter Имя сервера: pulseaudio Версия сервера: 15.0 Спецификация отсчётов по умолчанию: s16le 2-канальный 4410 Схема каналов по умолчанию: front-left,front-right Аудиоприёмник по умолчанию: alsa_output.pci-0000_29_00.6.analog-stereo Источник по умолчанию: alsa_output.pci-0000_29_00.6.analog-stereo.monitor Cookie: 88e2:4950

ghost commented 3 years ago

that's really weird, may you show the output of pactl info? it may be helpful

And by the way, after I completely removed GNOME DE from my PC (sudo pacman -Rsc gnome), reinstalled mousai (dependencies broke) and rebooted my PC - Mousai doesn't work again XD

ghost commented 3 years ago

that's really weird, may you show the output of pactl info? it may be helpful

What do I need to install for Mousai to work in my DWM? There's a really big package list in a "gnome" pack, I don't know what exactly I have to install

ghost commented 3 years ago

that's really weird, may you show the output of pactl info? it may be helpful

So I looked thru the list of packages of GNOME and installed soundtouch, rebooted - now Mousai works...

I'm fairly new to linux and I don't know what this package does, but it worked out for me. BTW, here's my pactl info after I installed soundtouch:


Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 6
Tile Size: 65472
User Name: anonymous
Host Name: MyCompooter
Server Name: pulseaudio
Server Version: 15.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_29_00.6.analog-stereo
Default Source: alsa_output.pci-0000_29_00.6.analog-stereo.monitor
Cookie: 9aa9:ebc6```
ghost commented 3 years ago

Guess I have to close this issue...

ghost commented 3 years ago

No... This issue is here again, after a reboot. Is this because Arch is weird or because I am? =)

SeaDve commented 3 years ago

im not sure either whats happening :D but the output of pactl info seems normal

Does the terminal output something when the audio is not being recorded?

ghost commented 3 years ago

im not sure either whats happening :D but the output of pactl info seems normal

I'm using a Suckless's Dynamic Window Manager and the only things that launch (except systemctl enabled by default) when I start my .xinitrc are DWM, Nitrogen, Picom and LXSession. Maybe I need to launch smth else? soundtouch is not executable.

SeaDve commented 3 years ago

since pactl info is working, i think nothing else.

terminal output, if any, while reproducing the issue may be helpful too, as you may have a missing plugin

ghost commented 3 years ago

since pactl info is working, i think nothing else.

terminal output, if any, while reproducing the issue may be helpful too, as it may be a missing plugin

So I changed my locale so it's readable for you, restarted and... And Mousai worked!

After the previous reboot I INSTALLED NOTHING and DID NOTHING else.

Maybe it's the issue with locales???

ghost commented 3 years ago

And again pactl info:


Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 2
Tile Size: 65472
User Name: anonymous
Host Name: MyCompooter
Server Name: pulseaudio
Server Version: 15.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_29_00.6.analog-stereo
Default Source: alsa_output.pci-0000_29_00.6.analog-stereo.monitor
Cookie: 8636:7b9d```
SeaDve commented 3 years ago

ah yess i think so, ironically, lmao

SeaDve commented 3 years ago

to validate, it would be helpful to check the output of mousai when run on terminal

ghost commented 3 years ago

to validate, it would be helpful to check the output of mousai when run on terminal So I rebooted with my default ru_RU.UTF-8 locale again, and my theory is working - it's the issue with locales.

And here is the terminal output of Mousai with my ru_RU.UTF-8 locale you asked for:


(io.github.seadve.Mousai:2326): GStreamer-CRITICAL **: 16:34:47.452: _gst_util_uint64_scale: assertion 'denom != 0' failed

(io.github.seadve.Mousai:2326): GStreamer-CRITICAL **: 16:34:47.452: gst_segment_to_running_time: assertion 'segment->format == format' failed

(io.github.seadve.Mousai:2326): GStreamer-CRITICAL **: 16:34:47.452: gst_segment_to_stream_time: assertion 'segment->format == format' failed
Error: gst-resource-error-quark: Failed to connect stream: Недопустимый параметр (1) ../gst-plugins-good/ext/pulse/pulsesrc.c(1619): gst_pulsesrc_prepare (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0
Error: gst-stream-error-quark: Internal data stream error. (1) ../gstreamer/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:
streaming stopped, reason not-negotiated (-4)
Traceback (most recent call last):
  File "/usr/local/share/mousai/mousai/backend/voice_recorder.py", line 94, in _on_gst_message
    self.props.peak = message.get_structure().get_value('peak')[0]
IndexError: list index out of range
SeaDve commented 3 years ago

to explain why it is happening, mousai gets the 3rd word of 13th line of the output of pactl info. so in certain locales, it will have different number of words and yields unexpected results

SeaDve commented 3 years ago

ill push a fix, thanks for the help

SeaDve commented 3 years ago

u can set LANGUAGE=en_US as an environment variable when running mousai so you dont have to set the global locale of your system

ghost commented 3 years ago

that's really weird, may you show the output of pactl info? it may be helpful

So I looked thru the list of packages of GNOME and installed soundtouch, rebooted - now Mousai works...

I'm fairly new to linux and I don't know what this package does, but it worked out for me. BTW, here's my pactl info after I installed soundtouch:

Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 6
Tile Size: 65472
User Name: anonymous
Host Name: MyCompooter
Server Name: pulseaudio
Server Version: 15.0
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_29_00.6.analog-stereo
Default Source: alsa_output.pci-0000_29_00.6.analog-stereo.monitor
Cookie: 9aa9:ebc6```

And yes, here my locale was still changed to english en_US.UTF-8 =) Just to clarify.

ghost commented 3 years ago

ill push a fix, thanks for the help

Could you please notify me (e.g. close this issue or just ping me here) when this issue is fixed in the AUR package?

SeaDve commented 3 years ago

im not the maintainer there, so not sure, but it should come a few hours after i do release on flathub

SeaDve commented 3 years ago

just published the hopeful fix

SeaDve commented 3 years ago

you can quickly test through https://github.com/SeaDve/Mousai/suites/3713534434/artifacts/90752673 if you have flatpak

SeaDve commented 3 years ago

@KpauMupa the fix seems to be pushed to AUR see version 0.6.6

ghost commented 3 years ago

Mousai 0.6.6-1 from the AUR - the issue with ru_RU.UTF-8 locale is still there; compiled Mousai from source (this repo) - everything's fine =)