You are not logged in.

#1 2020-09-12 05:43:14

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,305
Website

[FIXED] (Intel sound card) Buster audio truncates the start of files.

Has anyone else found espeak(-ng) truncating the start of short strings?
It's only started for me with the upgrade to Buster.
eg 'espeak "This is a test message"' will output "test message" or the like. Only sometimes, and varying cutoff.

I tried upgrading from espeak to espeak-ng-espeak which seemed to fix it, then reverted...

Very annoying, but Aunty Google hasn't had any advice so far.

Last edited by johnraff (2020-09-15 23:55:46)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#2 2020-09-12 22:31:18

ohnonot
...again
Registered: 2015-09-29
Posts: 4,880
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

I'm currently using espeak-ng, and it works as expected (I mostly use it for short messages): https://dt.iki.fi/stuff/forums/bunsen/t … essage.wav
But I don't remember having any such problems with espeak proper, either.
Is it possible that your sound architecture is at fault and not espeak itself? Is the problem still there when you record the message? Or try different voices, different speeds?

Last edited by ohnonot (2020-09-12 22:31:51)


BL quote proposals to this thread please.
my repos / my repos
---
Thank you for posting direct image links!

Offline

#3 2020-09-13 03:02:53

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,305
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

I had no issues with espeak on Helium - this started with the upgrade to Buster/Lithium.
Outputting to a file didn't help either, nor different voices or speeds.
Switching to espeak-ng didn't help either, so yes it might well be an audio-system level problem.

Reinforced by playing your link.
Firefox suggests I open it in vlc which plays "test message". neutral
(The second play is OK though.)

So something in the audio chain is taking time to load up. It's not VLC itself though, this truncates the string too:

espeak-ng 'This is a test message.' --stdout | aplay

Any suggestions of places to look?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#4 2020-09-13 03:11:51

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,305
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

johnraff wrote:

Outputting to a file didn't help either

But I need to go back and check if it's the file that's truncated, or the playback.

EDIT yes with your file 'aplay thisisatestmessage.wav' truncates the string the first time it's run. After that it's unpredictable.
Same with mpv.

So it's not espeak.
Maybe something about whatever library plays wav files...

Last edited by johnraff (2020-09-13 05:04:30)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#5 2020-09-14 05:57:58

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,305
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

It's not wav files either. I converted ohnono's "this is a test message" to flac and ogg files and got the same erratic truncation of the beginning playing any of the files with mpv or vlc.

Alsa or pulse issue?

EDIT: not pulse.
Using aplay while disabling pulse still truncates:

pasuspender -- aplay -D plughw:CARD=PCH thisisatestmessage.wav

EDIT: I thought it might be the kernel. Changelog of linux-image-5.7.0-0.bpo.2-amd64 holds a lot of ALSA and audio fixes, but on a VM, tried upgrading from 4.19.132-1 to 5.7.10-1~bpo10+1: no change. neutral

Last edited by johnraff (2020-09-14 07:29:06)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#6 2020-09-14 07:41:43

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,101
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

Could be a driver issue of some sort, some old notes here (not exactly the same problem, but could be related).

Last edited by brontosaurusrex (2020-09-14 07:53:27)

Online

#7 2020-09-14 08:17:28

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,305
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

^Thanks! It is an intel card, so might be related.
I'll have a look...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#8 2020-09-15 09:25:37

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,305
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

@bronto many thanks - I think that's got it!
Instead of going over all the sound modules I just disabled the snd_hda_intel module's power saving:

root@lithium:/sys/module# echo 0 > ./snd_hda_intel/parameters/power_save

and the issue seems fixed. It's an intermittent bug, so I'll give it a bit longer, and if all's well add the fix to my bootup.

I guess it's possible to imagine some power-saving algorithm shutting down the sound card when it's not being used, and causing a small delay when it gets a new sound to play. Good for laptops I'm sure, but not needed on this desktop.

Anyway Thank You! TxqYYyb.gif


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#9 2020-09-15 09:32:52

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,305
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

PS found a simpler way to make it permanent, from here: https://major.io/2019/03/04/stop-audio- … -hd-audio/

This setting will last until you reboot. You can make it permanent by adding this text to /etc/modprobe.d/audio_disable_powersave.conf:

options snd_hda_intel power_save=0

Just rebooting now...

...that did it!

Last edited by johnraff (2020-09-15 09:37:39)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#10 2020-09-15 10:55:53

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,101
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

Cool & better solution noted.

Online

#11 2020-09-16 00:00:39

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,305
Website

Re: [FIXED] (Intel sound card) Buster audio truncates the start of files.

^great intuitive jump on your part.
Without any pops and clicks, I'd probably never have found it. Now I know what to google for, intel power saving does bring up some hits...

(Moved to "Kernel & Hardware".)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB