signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.49k stars 2.63k forks source link

Stuttering/glitchy voice messages #5215

Open chriskalos opened 3 years ago

chriskalos commented 3 years ago

Bug Description

Audio messages stutter and/or glitch when recorded from the desktop app. It is not an issue during playback, the actual file sounds glitchy and stuttery.

Steps to Reproduce

This does not work all the time but I have been able to reproduce it on both an M1 MacBook Air (running under Rosetta 2) and on a Windows PC with an Intel Pentium G4560.

  1. Press the microphone in the chat to send a voice message
  2. Speak
  3. Send voice message
  4. Play it back

Actual Result:

Voice message stutters and repeats small bits or skips ahead in a glitchy manner at various points.

Expected Result:

A normal voice message

Screenshots

N/A

Platform Info

Signal Version:

5.0.0 and prior

Operating System:

Windows, macOS

Linked Device Version:

N/A

Debug Log

To censor sensitive info like system paths, I have only attached the part of the debug log that is relevant to the voice message in question. Please let me know if I need to provide the entire debug log (therefore having to reproduce the issue again) or if there is more sensitive information attached in this one.

[...]
INFO  2021-04-29T15:39:42.162Z MessageReceiver.cacheAndQueueBatch 1
INFO  2021-04-29T15:39:42.165Z queueing envelope 84e887234f8647b684a5b53c076da9ae
INFO  2021-04-29T15:39:42.165Z MessageReceiver.handleContentMessage 84e887234f8647b684a5b53c076da9ae
INFO  2021-04-29T15:39:42.165Z received unidentified sender message
INFO  2021-04-29T15:39:42.168Z New remote ephemeral key
INFO  2021-04-29T15:39:42.169Z Deleting chain closed at 1619551340273
INFO  2021-04-29T15:39:42.248Z MessageReceiver.cacheUpdateBatch 1
INFO  2021-04-29T15:39:43.139Z MessageAudio: ended, changing UI [REDACTED]cca
INFO  2021-04-29T15:39:43.139Z MessageAudio: resuming playback for [REDACTED]cca
INFO  2021-04-29T15:39:43.140Z MessageAudio: pausing playback for [REDACTED]cca
INFO  2021-04-29T15:39:43.144Z MessageAudio: pausing playback for [REDACTED]cca
INFO  2021-04-29T15:39:43.144Z MessageAudio: resume error [REDACTED]cca {}
INFO  2021-04-29T15:39:47.110Z Removing notification
INFO  2021-04-29T15:39:47.759Z SQL(getUnreadByConversation) succeeded in 146ms
INFO  2021-04-29T15:39:47.760Z SQL channel job 754 (getUnreadByConversation) succeeded in 147ms
INFO  2021-04-29T15:39:48.111Z Not updating notifications; notification status is noNotifications. 
INFO  2021-04-29T15:39:52.245Z MessageReceiver.cacheAndQueueBatch 1
INFO  2021-04-29T15:39:52.247Z queueing envelope b27a04b94bdb4b3691173d0fd93317f0
INFO  2021-04-29T15:39:52.247Z MessageReceiver.handleContentMessage b27a04b94bdb4b3691173d0fd93317f0
INFO  2021-04-29T15:39:52.247Z received unidentified sender message
INFO  2021-04-29T15:39:52.331Z MessageReceiver.cacheUpdateBatch 1
INFO  2021-04-29T15:39:54.062Z Loaded this list of log files from logPath: app.log, main.log
hwulfmeyer commented 3 years ago

Hey I have a similar problem. They are probably related.

Using signal desktop the voice message contains crackling noises. Other messengers or programs on the machine do not show the same behaviour.

I use an USB-Microphone. My Webcam (vis USB) has the same problem.

here the voice message: https://user-images.githubusercontent.com/9419801/124112450-98cea480-da6a-11eb-805e-1ced78cf348e.mp4

The original voice message is in .MPEG. 160 kbit/s bitrate with stereo and 48kHz and 32 bits per sample.

Not really sure why the format & encoding is as it is as above.

Also voice messages recorded via my phone are in .AAC not .MPEG. 44100Hz and 32bits per sample.

I pretty much think its an encoding issue.

For example the desktop client of telegram uses Opus Audio with 48kHz and 32Bits/Sample. Whatsapp uses the same format and encoding.

chriskalos commented 3 years ago

Hey I have a similar problem. They are probably related.

Using signal desktop the voice message contains crackling noises. Other messengers or programs on the machine do not show the same behaviour.

I use an USB-Microphone. My Webcam (vis USB) has the same problem.

here the voice message: https://user-images.githubusercontent.com/9419801/124112450-98cea480-da6a-11eb-805e-1ced78cf348e.mp4

The original voice message is in .MPEG. 160 kbit/s bitrate with stereo and 48kHz and 32 bits per sample.

Not really sure why the format & encoding is as it is as above.

Also voice messages recorded via my phone are in .AAC not .MPEG. 44100Hz and 32bits per sample.

I pretty much think its an encoding issue.

For example the desktop client of telegram uses Opus Audio with 48kHz and 32Bits/Sample. Whatsapp uses the same format and encoding.

Yes, crackling and lagging are related. I get both on my voice messages. Lagging more often than crackling, but I have gotten this as well.

It only happens when sending a voice message via Signal Desktop, on both Windows (x64) and macOS (Rosetta 2 and M1-native Unofficial build).

emacu commented 2 years ago

Hello, I can reproduce it via Signal Desktop on macOS 12.3 (M1 Max) when I send a voice message longer than 30 seconds or 2 minutes.

PirateAndy596 commented 1 year ago

Issue has been open since 2021 and still no fix?

scottnonnenberg-signal commented 1 year ago

Our fix was to move to a modern API for capturing voice notes, but we were blocked by this Electron bug: https://github.com/electron/electron/issues/34845

norstbox commented 1 year ago

Our fix was to move to a modern API for capturing voice notes

@scottnonnenberg-signal Did you consider the good old MediaStream Recording API?

PirateAndy596 commented 11 months ago

Hey I have a similar problem. They are probably related.

Using signal desktop the voice message contains crackling noises. Other messengers or programs on the machine do not show the same behaviour.

I use an USB-Microphone. My Webcam (vis USB) has the same problem.

here the voice message: https://user-images.githubusercontent.com/9419801/124112450-98cea480-da6a-11eb-805e-1ced78cf348e.mp4

The original voice message is in .MPEG. 160 kbit/s bitrate with stereo and 48kHz and 32 bits per sample.

Not really sure why the format & encoding is as it is as above.

Also voice messages recorded via my phone are in .AAC not .MPEG. 44100Hz and 32bits per sample.

I pretty much think its an encoding issue.

For example the desktop client of telegram uses Opus Audio with 48kHz and 32Bits/Sample. Whatsapp uses the same format and encoding.

This is trhe exact issue I'm having after listening to your recording. The pops and crackles in the background are so annoying and every other app on my PC does not do this.

I can even record a voice clip with Audacity and send it via Signal Desktop and the issue will not occur.

It's so bizarre it randomly started happening to me, and even more bizarre they have had this running for years at this point and still no solid fix forthcoming.

ouacheter commented 11 months ago

Same problem for me. Recording on signal pc.

Yaamaari commented 7 months ago

I have the same issue. To be honest I was quite surprised, that this issue already exists for over 2 years.

Kariton commented 7 months ago

Hey,

just want to say, that im also affected by this exact problem. i got a new mic and now i record crackling / glitchy voice messages on my pc. (havent tried calls jet)

Signal:

6.44.1
production

Windows:

version 22H2 (0S Build 22621.3007)

I really appreciate that @scottnonnenberg-signal is actively investigating https://github.com/electron/electron/issues/34845! Big thanks for that - at least there is something happening. :)

But looking at the age of the issue in general... i want to kindly ask if there is another way to bring this issue forward and maybe implement a workaround in the meantime.

love what all of you do here! keep up the good work! <3

Kariton commented 7 months ago

just got a friend to test it with me: if i call him he cant hear me at all. and my voice messages are crackling. super strange...

scottnonnenberg-signal commented 7 months ago

@Kariton Hey there - in the settings for our new microphone, is there a way to have it present itself as basic stereo inputs? We've seen issues with many-channel microphones and call; maybe that's affecting voice note recording as well?

Kariton commented 7 months ago

sorry, somehow github mails are suddenly marked as spam and i havent noticed your reply...

so my mic is configured as "2 channel, 24 blt, 96000 Hz (Studio Quality)" - and i utilize the windows separation of default and default com device.

i have seen the other issue related to multiple channel mics later on while searching for solutions. then i tried with mono but it made no difference for me.

maybe the "quality" is to high for signal to handle it? IIRC i have tested lower bit / Hz values as well but now im unsure. :)

sysfsss commented 2 months ago

I have this issue on a NI Komplete Audio 6 MK2. No bit depth or sampling rate (set on any or ALL, even unused) interfaces seems to make a difference.

Of course, recording it in audacity and dragging it into signal is perfect, but... i got bronchitis

robibla commented 2 months ago

I've been having the same issue over the last few years, on multiple systems. Wish they would fix this!

jeayalar commented 1 month ago

Wow, didn't know this issue had been going on for the last few years. Any chance we could get a fix for it anytime soon?