Say() is ignoring volume


I’m using say to output Text-to-speech on the analog audio output of the Raspberry Pi. I can change the volume using alsamixer. But the volume within the command say() is ignored.

I tried
say(“Test”, new PercentType(25))
say(“Test”, “voicerss:deDE”, new PercentType(25))
but the volume is the same and doesn’t change while I chage the number in PercentType.

How can I solve this?

1 Like

You should make an extra item

Number ChromecastVolume   "Volume Chromecast"  { channel = "chromecast:chromecast:vcvcvcvvcvcvcvcvc:volume"}

Before you use say()

1 Like

I don’t use Chromcast for the output. I use the analog audio output of the Raspberry Pi or a USB sound card. So I don’t have this channel. Or is there a way to link the volume of the Raspberry Pi to a Number?

1 Like

I am sorry if have misread that you used the Rpi output.

1 Like

With the Rpi output, you will need to control the volume separately via a script.

You should test first to see if it is configured to use the 3.5mm jack and not the HDMI audio output.

If I recall you can write a script to execute the settings for volume via ALSA.

/usr/bin/amixer cset numid=1 100%
1 Like