Mousai icon indicating copy to clipboard operation
Mousai copied to clipboard

Improve error handling when no sound is detected from audio source

Open BusyBird15 opened this issue 2 years ago • 3 comments

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

BusyBird15 avatar Dec 13 '23 01:12 BusyBird15

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

SeaDve avatar Dec 13 '23 02:12 SeaDve

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`.",
    ),
})

BusyBird15 avatar Dec 13 '23 17:12 BusyBird15

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

This could use some better error message though

SeaDve avatar Jan 27 '24 12:01 SeaDve