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

Improve error handling when no sound is detected from audio source #112

Open
BusyBird15 opened this issue Dec 13, 2023 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@BusyBird15
Copy link

Affected version

  • io.github.seadve.Mousai 0.7.5

  • Flatpak: false

  • Language: en_US.UTF-8, en_US, en.UTF-8, en, C

  • Distribution: Ubuntu Core 22

  • Desktop Session: ubuntu

  • Display Server: wayland

  • GTK 4.12.2

  • Libadwaita 1.4.0

  • Libsoup 3.4.3

  • GStreamer 1.20.3

Bug summary

I attempted to try the app out, recording desktop audio, and it gave me such an error.

Steps to reproduce

Open the app, click "Listen" and it shows an error. I was playing "Loose My Soul" by TobyMac.

Expected behavior

Get the song info.

Relevant logs, screenshots, screencasts, etc.
image

@SeaDve
Copy link
Owner

SeaDve commented Dec 13, 2023

Thanks for reporting! Can you reproduce the error, and copy the logs

@BusyBird15
Copy link
Author

Thank you for the fast response! By running mousai in a terminal then clicking "Listen", this is my output:

2023-12-13T17:13:45.555384Z  INFO mousai::application: Mousai (io.github.seadve.Mousai)
2023-12-13T17:13:45.555531Z  INFO mousai::application: Version: 0.7.5 ()
2023-12-13T17:13:45.555554Z  INFO mousai::application: Datadir: /snap/mousai/current/usr/share/mousai
2023-12-13T17:13:55.030676Z  WARN mousai::audio_device: Skipping device `pulsedevice1` as it has no node.name property. FieldNotFound { name: "node.name" }
2023-12-13T17:13:55.031301Z  WARN mousai::audio_device: Failed to find default name using gstreamer: Failed to find a default device

(mousai:22135): GStreamer-CRITICAL **: 12:13:55.182: _gst_util_uint64_scale: assertion 'denom != 0' failed

(mousai:22135): GStreamer-CRITICAL **: 12:13:55.182: gst_segment_to_running_time: assertion 'segment->format == format' failed

(mousai:22135): GStreamer-CRITICAL **: 12:13:55.182: gst_segment_to_stream_time: assertion 'segment->format == format' failed
2023-12-13T17:14:00.833497Z ERROR mousai::window::imp: Received Other Permanent Error: #700: Recognition failed: you didn't send file via POST or file url as `url` param. If you sent the request by POST, please check the protocol you're using: the URL should start with https:// (http:// requests get redirected so we don't receive any data from you) and that your Content-Type header equals to `multipart/form-data`. (dbg: RecognizeError {
    kind: OtherPermanent,
    message: Some(
        "#700: Recognition failed: you didn't send file via POST or file url as `url` param. If you sent the request by POST, please check the protocol you're using: the URL should start with https:// (http:// requests get redirected so we don't receive any data from you) and that your Content-Type header equals to `multipart/form-data`.",
    ),
})

@SeaDve
Copy link
Owner

SeaDve commented Jan 27, 2024

It seems your microphone is not detected or no sound is being recorded from it.

This could use some better error message though

@SeaDve SeaDve changed the title "Received Other Permanent Error" Improve error handling when no sound is detected from audio source Jan 27, 2024
@SeaDve SeaDve added the enhancement New feature or request label Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants