Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't recognize audio from speakers #151

Open
glu8716 opened this issue Jan 17, 2024 · 10 comments
Open

Can't recognize audio from speakers #151

glu8716 opened this issue Jan 17, 2024 · 10 comments

Comments

@glu8716
Copy link

glu8716 commented Jan 17, 2024

Operating system: Artix Linux with PipeWire

SongRec can't recognize audio from speakers (system's audio). I checked the option "Recognize from my speakers instead of microphone", and the audio input is correctly set to "Monitor of Built-in Audio Analog Stereo". I can, in fact, use it as input in other programs to stream the audio coming from the system.

A screenshot for reference:
image
The audio from mpv is playing, but the level bar on SongRec isn't moving, and the SongRec recording stream isn't showing in Pavucontrol.

@randomcoder67
Copy link

Same issue, started happening after songrec updated through pacman, still happens on latest git version.

Trying to manually switch to Monitor of Alder Lake PCH-P High Definition Audio Controller Speaker + Headphones in songrec gui causes it to crash with this output:

thread '<unnamed>' panicked at src/core/microphone_thread.rs:55:60:
Failed to get default input config: DeviceNotAvailable
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at src/gui/main_window.rs:534:83:
called `Result::unwrap()` on an `Err` value: SendError { .. }

Full backtrace (RUST_BACKTRACE=full songrec):

thread '<unnamed>' panicked at src/core/microphone_thread.rs:55:60:
Failed to get default input config: DeviceNotAvailable
stack backtrace:
   0:     0x609ae09c67bc - <unknown>
   1:     0x609ae09f47e0 - <unknown>
   2:     0x609ae09c2cbd - <unknown>
   3:     0x609ae09c65a5 - <unknown>
   4:     0x609ae09c7f23 - <unknown>
   5:     0x609ae09c7c5a - <unknown>
   6:     0x609ae09c8455 - <unknown>
   7:     0x609ae09c833e - <unknown>
   8:     0x609ae09c6c76 - <unknown>
   9:     0x609ae09c80c2 - <unknown>
  10:     0x609ae0632aa5 - <unknown>
  11:     0x609ae0632f83 - <unknown>
  12:     0x609ae0659ea4 - <unknown>
  13:     0x609ae065f90c - <unknown>
  14:     0x609ae06bd9ec - <unknown>
  15:     0x609ae09cd595 - <unknown>
  16:     0x7b9e613bd9eb - <unknown>
  17:     0x7b9e614417cc - <unknown>
  18:                0x0 - <unknown>
thread 'main' panicked at src/gui/main_window.rs:534:83:
called `Result::unwrap()` on an `Err` value: SendError { .. }
stack backtrace:
   0:     0x609ae09c67bc - <unknown>
   1:     0x609ae09f47e0 - <unknown>
   2:     0x609ae09c2cbd - <unknown>
   3:     0x609ae09c65a5 - <unknown>
   4:     0x609ae09c7f23 - <unknown>
   5:     0x609ae09c7c5a - <unknown>
   6:     0x609ae09c8455 - <unknown>
   7:     0x609ae09c833e - <unknown>
   8:     0x609ae09c6c76 - <unknown>
   9:     0x609ae09c80c2 - <unknown>
  10:     0x609ae0632aa5 - <unknown>
  11:     0x609ae0632f83 - <unknown>
  12:     0x609ae06af7ae - <unknown>
  13:     0x7b9e6200fb73 - <unknown>
  14:     0x7b9e6200fc77 - g_signal_emit_valist
  15:     0x7b9e6200fd34 - g_signal_emit
  16:     0x7b9e624fdd13 - <unknown>
  17:     0x7b9e624fe440 - gtk_combo_box_set_active_iter
  18:     0x7b9e624fe8d4 - <unknown>
  19:     0x7b9e61feefc0 - g_cclosure_marshal_VOID__STRINGv
  20:     0x7b9e6200fb73 - <unknown>
  21:     0x7b9e6200fc77 - g_signal_emit_valist
  22:     0x7b9e6200fd34 - g_signal_emit
  23:     0x7b9e62706d77 - <unknown>
  24:     0x7b9e61ff06c0 - g_closure_invoke
  25:     0x7b9e6201ea36 - <unknown>
  26:     0x7b9e6200fa42 - <unknown>
  27:     0x7b9e6200fc77 - g_signal_emit_valist
  28:     0x7b9e6200fd34 - g_signal_emit
  29:     0x7b9e6274128d - gtk_widget_activate
  30:     0x7b9e626052ad - gtk_menu_shell_activate_item
  31:     0x7b9e626055ea - <unknown>
  32:     0x7b9e62487829 - <unknown>
  33:     0x7b9e6200fb73 - <unknown>
  34:     0x7b9e6200fc77 - g_signal_emit_valist
  35:     0x7b9e6200fd34 - g_signal_emit
  36:     0x7b9e62754cd5 - <unknown>
  37:     0x7b9e625eec6b - <unknown>
  38:     0x7b9e625ef797 - gtk_main_do_event
  39:     0x7b9e62c49b77 - <unknown>
  40:     0x7b9e62ca2438 - <unknown>
  41:     0x7b9e61ee9f69 - <unknown>
  42:     0x7b9e61f48367 - <unknown>
  43:     0x7b9e61ee8162 - g_main_context_iteration
  44:     0x7b9e6211db66 - g_application_run
  45:     0x609ae0692780 - <unknown>
  46:     0x609ae066b133 - <unknown>
  47:     0x609ae065fbd3 - <unknown>
  48:     0x609ae068c419 - <unknown>
  49:     0x609ae09bda9d - <unknown>
  50:     0x609ae068c40e - <unknown>
  51:     0x7b9e61358cd0 - <unknown>
  52:     0x7b9e61358d8a - __libc_start_main
  53:     0x609ae0633245 - <unknown>
  54:                0x0 - <unknown>

Trying to select the Recognize from my speakers instead of microphone checkbox also crashes it in the same way.

I'm using Pipewire, pactl info shows:

Server Name: PulseAudio (on PipeWire 1.0.1)

@marin-m
Copy link
Owner

marin-m commented Jan 23, 2024

Hello,

I don't have this issue with Fedora 39 with only pipewire and pipewire-pulse (no pulseaudio) running, and with the native (non-Flatpak) SongRec build.

With the same Fedora setup and SongRec 0.4.2 + Flatpak it works fine too.

[marin@fedora songrec]$ pipewire --version
pipewire
Compiled with libpipewire 1.0.0
Linked with libpipewire 1.0.0

I don't have this issue neither with Ubuntu 22.04 LTS and pulseaudio running.

There may be an issue with either the PipeWire/libpulse or PipeWire/emulated-ALSA interface on your setup, I guess.

@randomcoder67
Copy link

Hello,

I don't have this issue with Fedora 39 with only pipewire and pipewire-pulse (no pulseaudio) running, and with the native (non-Flatpak) SongRec build.

With the same Fedora setup and SongRec 0.4.2 + Flatpak it works fine too.

[marin@fedora songrec]$ pipewire --version
pipewire
Compiled with libpipewire 1.0.0
Linked with libpipewire 1.0.0

I don't have this issue neither with Ubuntu 22.04 LTS and pulseaudio running.

There may be an issue with either the PipeWire/libpulse or PipeWire/emulated-ALSA interface on your setup, I guess.

Looking at my pacman log file, there were pipewire updates installed an hour before I tried reinstalling songrec (so presumably when I first noticed the issue), which makes it sound like pipewire did change something. However other programs are still working fine with "Sink Monitors", I installed OBS for example and it picks it up fine.

Here is my pipewire version:

pipewire
Compiled with libpipewire 1.0.1
Linked with libpipewire 1.0.1

@marin-m
Copy link
Owner

marin-m commented Jan 23, 2024

No issue when updating PipeWire to version 1.0.1 on my Fedora setup, and no issue when testing with Manjaro 23.1.13 neither.

On Manjaro both the pipewire-pulse and pipewire-alsa packages are installed by default. Is it also the case with your setup?

@Kljunas2
Copy link

Hi,
I had the same problem (crash) on some older version of SongRec (probably 4.0), which has been fixed by now (I think by 4.1). I can now normally select the input.
But still it doesn't record nor detect any input. Pulsemixer doesn't even show SongRec anywhere. If I downgrade to 3.3, then it works again. So the problem apparently isn't with pipewire.
I don't have pulseaudio installed. I am attaching the list of all installed packages which contain either "pipewire" or "pulse":

helvum
libcanberra
libcec
libpipewire
libpulse
libwireplumber
pamixer
pipewire
pipewire-alsa
pipewire-audio
pipewire-pulse
pipewire-v4l2
pulsemixer
wireplumber

I am running arch linux, pipewire 1.0.1.
If there are more logs or any information I could provide to help debug the problem, I would be happy to help.

@Kljunas2
Copy link

Just a minute after posting the last commend, I have tried to remove /etc/asound.conf. Now it works.

@glu8716
Copy link
Author

glu8716 commented Jan 23, 2024

On Manjaro both the pipewire-pulse and pipewire-alsa packages are installed by default. Is it also the case with your setup?

Can confirm that installing pipewire-alsa fixes the problem for me.

@marin-m
Copy link
Owner

marin-m commented Jan 24, 2024

I have made a bug report to Arch: https://gitlab.archlinux.org/archlinux/packaging/packages/songrec/-/issues/1

@NaturalHate
Copy link

I have the issue on Nobara too.
Basically, the input setting of the app does absolutely nothing. If I go into my KDE audio settings and switch my input device I can switch it to one that the app seems to be stuck on, which works for the audio input, but of course it isn't my headset so I can't hear anything. If I'm on that audio device I can again, switch the input device within the app all I want and it does not change anything, it still picks up the audio from that device I selected in the KDE settings. If I unplug the working device then the app works fine with my headphones.
So my conclusion is that the input method in the app is simply not working and it defaults to an irrelevant audio device.

@randomcoder67
Copy link

Install pipewire-alsa fixed the issue for me too. Weird as I didn't need that previously, just checked an it's never been installed on my system before. Did something in pipewire change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants