53c1165d3f16c747d2db76eec5bf2ecad0abb822
[AGL/meta-agl-demo.git] / recipes-demo-hmi / navigation / navigation / 0001-switch-to-pipewire-output.patch
1 gpsnavi: Switch to pipewire output
2
3 Update the talk scripts to use pipewire output via gst-launch-1.0
4 instead of PulseAudio's paplay.  gstreamer is used to allow using the
5 pipewire output sink and set its media role property.
6
7 Upstream-Status: Inappropriate [no upstream]
8
9 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
10
11 diff --git a/flite_agl.in b/flite_agl.in
12 index 28b512c..be41d66 100644
13 --- a/flite_agl.in
14 +++ b/flite_agl.in
15 @@ -1,6 +1,6 @@
16  #!/bin/sh
17  TMP=/tmp/navi.wav
18  echo "$1" | flite_hts_engine -m  @datadir@/Voice/us/cmu_us_arctic_slt.htsvoice -o $TMP
19 -paplay --property='media.role=Navi' $TMP
20 +gst-launch-1.0 filesrc location=$TMP ! decodebin ! audioconvert ! audioresample ! pwaudiosink stream-properties="p,media.role=Navigation"
21  rm -f $TMP
22  
23 diff --git a/jtalk_agl.in b/jtalk_agl.in
24 index 76900f4..0ca6975 100644
25 --- a/jtalk_agl.in
26 +++ b/jtalk_agl.in
27 @@ -1,6 +1,6 @@
28  #!/bin/sh
29  TMP=/tmp/navi.wav
30  echo "$1" | open_jtalk -ow $TMP -m @exec_prefix@/share/Voice/mei/mei_normal.htsvoice -x @exec_prefix@/share/dic/
31 -paplay --property='media.role=Navi' $TMP
32 +gst-launch-1.0 filesrc location=$TMP ! decodebin ! audioconvert ! audioresample ! pwaudiosink stream-properties="p,media.role=Navigation"
33  rm -f $TMP
34