Dear community,
My OpenHAB 3.2.0 server does not have a sound card but a PulseAudio RTP sink which is accessible by the PulseAudio binding in OpenHAB.
I have no particular java sinks:
openhab> openhab:audio sinks
* System Speaker (enhancedjavasound)
Web Audio (webaudio)
In contrast, here is the PulseAudio RTP sink:
openhab@openhab:~$ pactl -s 127.0.0.1 list sinks
Ziel #0
Status: RUNNING
Name: rtp
Beschreibung: RTP Multicast Sink
Treiber: module-null-sink.c
Abtastwert-Angabe: s16le 1ch 16000Hz
Kanalzuordnung: mono
Besitzer-Modul: 10
Stumm: nein
Lautstärke: mono: 32768 / 50% / -18,06 dB
Verteilung 0,00
Basis-Lautstärke: 65536 / 100% / 0,00 dB
Quellen-Monitor: rtp.monitor
Latenz: 18534 usec, eingestellt 40000 usec
Flags: DECIBEL_VOLUME LATENCY
Eigenschaften:
device.description = "RTP Multicast Sink"
device.class = "abstract"
device.icon_name = "audio-card"
Formate:
pcm
When outputting audio via System Speaker (enhancedjavasound), OpenHAB does not make use of the PulseAudio sink. From what I understood is that the java audio sinks are different so that a link between PulseAudio sinks and java audio sinks may be missing.
When using the Karaf console and entering the command
openhab:audio play doorbell.mp3
I receive the following output:
2022-03-30 17:39:06.389 [WARN ] [nternal.javasound.JavaSoundAudioSink] - Cannot determine master volume level - assuming 100%
2022-03-30 17:39:06.415 [ERROR] [nternal.javasound.JavaSoundAudioSink] - An exception occurred while playing audio : 'Cannot create AudioDevice'
When I try to specify the PulseAudio sink with the Thing name:
openhab:audio play pulseaudio:sink:local:rtp doorbell.mp3
I do not receive any output in the log file.
When I try to send TTS speech output
openhab:voice say hello
then I receive:
2022-03-30 17:19:21.714 [WARN ] [nternal.javasound.JavaSoundAudioSink] - Cannot determine master volume level - assuming 100%
2022-03-30 17:19:21.718 [WARN ] [audio.internal.javasound.AudioPlayer] - No line found: No line matching interface SourceDataLine supporting format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, 8000.0 frames/second, little-endian is supported.
2022-03-30 17:49:26.671 [INFO ] [audio.internal.javasound.AudioPlayer] - Available lines are:
<empty>
I searched the forum and found very outdated information. Does anybody have a hint as how to further continue?
Best regards,
Peter