summaryrefslogtreecommitdiffstats
path: root/recipes-demo-hmi/navigation/navigation/0001-switch-to-pipewire-output.patch
blob: 53c1165d3f16c747d2db76eec5bf2ecad0abb822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
gpsnavi: Switch to pipewire output

Update the talk scripts to use pipewire output via gst-launch-1.0
instead of PulseAudio's paplay.  gstreamer is used to allow using the
pipewire output sink and set its media role property.

Upstream-Status: Inappropriate [no upstream]

Signed-off-by: Scott Murray <scott.murray@konsulko.com>

diff --git a/flite_agl.in b/flite_agl.in
index 28b512c..be41d66 100644
--- a/flite_agl.in
+++ b/flite_agl.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 TMP=/tmp/navi.wav
 echo "$1" | flite_hts_engine -m  @datadir@/Voice/us/cmu_us_arctic_slt.htsvoice -o $TMP
-paplay --property='media.role=Navi' $TMP
+gst-launch-1.0 filesrc location=$TMP ! decodebin ! audioconvert ! audioresample ! pwaudiosink stream-properties="p,media.role=Navigation"
 rm -f $TMP
 
diff --git a/jtalk_agl.in b/jtalk_agl.in
index 76900f4..0ca6975 100644
--- a/jtalk_agl.in
+++ b/jtalk_agl.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 TMP=/tmp/navi.wav
 echo "$1" | open_jtalk -ow $TMP -m @exec_prefix@/share/Voice/mei/mei_normal.htsvoice -x @exec_prefix@/share/dic/
-paplay --property='media.role=Navi' $TMP
+gst-launch-1.0 filesrc location=$TMP ! decodebin ! audioconvert ! audioresample ! pwaudiosink stream-properties="p,media.role=Navigation"
 rm -f $TMP