Skip to main content
Topic: SOLVED in upstream: espeak stops working after alsa upgrade (Read 1016 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SOLVED in upstream: espeak stops working after alsa upgrade

I updated my intel artix to latest and find I can no longer get sound from espeak and alsa. Other sources seem unaffected and espeak-ng still produces sound. FWIW I have exactly the same issue in Archlinux see

https://bbs.archlinux.org/viewtopic.php?id=267124


as I say there I think the problem lies in a change to alsa-lib.

It seems that original espeak  https://sourceforge.net/projects/espeak/ is pretty dormant so should I report this as a bug in alsa?

EDIT: seems as though alsa-lib upstream has a fix in see https://github.com/alsa-project/alsa-lib/issues/155
 

Re: BUG: espeak stops working after alsa upgrade

Reply #1
did you rebooted your computer after update? if not,  try rebbot your computer, maybe could help that.

Re: BUG: espeak stops working after alsa upgrade

Reply #2
yes I rebooted the machine and the problem does persist. The 1.2.5 version has extra errors from espeak in the output of say

espeak hello

I know that alsa does weird stuff sometimes, but speaker-test works fine and espeak does not; the problem persists through reboot and can easily be reversed by reverting pkg alsa-lib to 1.2.4.

Re: BUG: espeak stops working after alsa upgrade

Reply #3
espeak has some discussion here:
https://sourceforge.net/p/espeak/activity/?page=0&limit=100#607d55a49379ff7f9ae85640
But looking at the developers names, 2 of those people are running espeak-ng now:
https://github.com/orgs/espeak-ng/people
So perhaps you could contact them most easily by opening an issue on espeak-ng, explaining it was about original espeak:
https://github.com/espeak-ng/espeak-ng/issues

You might try to rebuild the espeak package aginst the new alsa-lib version, which is pretty simple to do:

Code: [Select]
$ cd /tmp
$ git clone https://gitea.artixlinux.org/packagesE/espeak
$ cd espeak/trunk/
$ makepkg -sir

Then I installed espeakup and espeakup-openrc and enabled that service and rebooted.
$ espeak
hello there
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Expression 'framesAvail' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3629
Expression 'PaAlsaStreamComponent_GetAvailableFrames( self, &framesAvail, xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3989
Expression 'PaAlsaStreamComponent_RegisterChannels( &self->playback, &self->bufferProcessor, &playbackFrames, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4118
Expression 'PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4359
Artix is great!       
Expression 'framesAvail' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3629
Expression 'PaAlsaStreamComponent_GetAvailableFrames( self, &framesAvail, xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3989
Expression 'PaAlsaStreamComponent_RegisterChannels( &self->playback, &self->bufferProcessor, &playbackFrames, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4118
Expression 'PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4359



After I tried that I got a bunch of errors too when I tried to run espeak, and it just said the first letter of the word, although I don't really know how to use it or set it up, but it does look like there could be a real problem there as you say.

Re: BUG: espeak stops working after alsa upgrade

Reply #4
espeak has some discussion here:
[........
You might try to rebuild the espeak package aginst the new alsa-lib version, which is pretty simple to do:

...........
After I tried that I got a bunch of errors too when I tried to run espeak, and it just said the first letter of the word, although I don't really know how to use it or set it up, but it does look like there could be a real problem there as you say.
I think I already tried most of the obvious things. There's little point in querying espeak-ng as that does not suffer from the problem and it can replace espeak using the links package., espeak-ng-espeak. I suspect that alsa-lib just changed some api and because it is not being maintained the original espeak has started to fail.

Re: BUG: espeak stops working after alsa upgrade

Reply #5
Code: [Select]
$ ls portaudio-19.7.0/src/hostapi/alsa/
pa_linux_alsa.c  pa_linux_alsa.lo  pa_linux_alsa.o
espeak uses portaudio to link to alsa, and the error messages come from there, and espeak-ng uses pulseaudio (unless compiled to use alsa) so this could be a portaudio bug. I tried rebuilding portaudio but with no luck.

Re: BUG: espeak stops working after alsa upgrade

Reply #6
Since libportaudio is unchanged and the sound loss follows the change of alsa-lib from 1.2.4 --> 1.2.5 I suppose the problem must come from a change in alsa-lib.
EDIT: on the other hand I see that portaudio has been making changes to pa_linux_alsa.c in the last few days so perhaps a new package for libportaudio will appear.

Re: BUG: espeak stops working after alsa upgrade

Reply #7
I made a portaudio-git PKGBUILD to see if it's fixed but it doesn't seem to be yet. There's a portaudio-svn in the AUR but I wasn't sure exactly what that was cloning so I tried with this.

Code: [Select]
# Maintainer: David Runge <[email protected]>
# Contributor: Lukas Fleischer <[email protected]>
# Contributor: Eric Belanger <[email protected]>
# Contributor: Darwin Bautista <[email protected]>
# Contributor: Bob Finch <[email protected]>

pkgname=portaudio-git
pkgver=19.7.0.rRC2.23.gd859f7d
pkgrel=1
epoch=1
pkgdesc='A free, cross-platform, open source, audio I/O library.'
arch=('x86_64')
url="https://github.com/Portaudio/portaudio/"
license=('MIT')
depends=('gcc-libs' 'glibc')
makedepends=('alsa-lib' 'jack')
provides=('libportaudio.so' 'libportaudiocpp.so' 'portaudio')
conflicts=('portaudio' 'portaudio-svn')
source=("git+https://github.com/PortAudio/portaudio.git")
sha256sums=('SKIP')

pkgver() {
  cd ${pkgname%-git}
  git describe --tags|sed 's+-+.r+'|tr - .| cut -c2-
}

prepare() {
  cd "${pkgname%-git}"
  (
    cd bindings/cpp
    autoreconf -fiv
  )
  autoreconf -fiv
}

build() {
  cd "${pkgname%-git}"
  ./configure --prefix=/usr \
              --enable-cxx
  # build breaks with multiple jobs when building C++ bindings:
  # https://github.com/PortAudio/portaudio/issues/540
  make -j1
}

package() {
  depends+=('libasound.so' 'libjack.so')
  cd "${pkgname%-git}"
  make DESTDIR="${pkgdir}" install
  install -vDm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -vDm 644 README.* -t "${pkgdir}/usr/share/doc/${pkgname}"
}

Re: BUG: espeak stops working after alsa upgrade

Reply #8
I made a portaudio-git PKGBUILD to see if it's fixed but it doesn't seem to be yet. There's a portaudio-svn in the AUR but I wasn't sure exactly what that was cloning so I tried with this.

..........

I tried the same exercise in Arch linux and got the same result.  I added an issue https://github.com/alsa-project/alsa-lib/issues/155 but unless this also breaks espeak-ng without libpulse it will probably not be addressed.