Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Bug Fix TC-661: SpeechSynthesisUtterance.text has no effect #6

Open
wants to merge 26 commits into
base: tizen/rc/next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5f2a3ca
Adding a spec file and updating the run-speech-daemon.sh to work on T…
brianjjones Aug 22, 2013
8002538
packaging: updated spec file, added config and systemd service files.
klihub Aug 22, 2013
cb97d11
packaging: enabled festival support.
klihub Sep 5, 2013
0e02d5a
packaging: load festival-voice TTS backend.
klihub Sep 11, 2013
ab75611
packaging: updated changelog and bumped version.
klihub Sep 5, 2013
b030eac
packaging: enabled D-Bus based activation.
klihub Sep 12, 2013
1d56434
packaging: bumped version and updated changelog.
klihub Sep 12, 2013
cb1c78c
packaging: load native client API plugin.
klihub Jan 8, 2014
a9fbbdf
packaging: added devel, and test subpackages, bumped version.
klihub Jan 7, 2014
b758239
packaging: temporarily switched to explicit package dependencies.
klihub Jan 10, 2014
1034cc2
packaging: enable socket-based activation for the native API.
klihub Jan 16, 2014
86cbe40
packaging: fix (workaround) socket-based activation to run as app.
klihub Jan 17, 2014
6fc7f8f
packaging: pulled in latest fixes, bumped version, updated changelog.
klihub Mar 11, 2014
6b099ce
packaging: pulled in latest fixes, bumped version, updated changelog.
klihub May 23, 2014
9d60924
packaging: enabled/added w3c-speech plugin, generate service file.
klihub Oct 28, 2014
34a533c
packaging: bumped version, updated changelog.
klihub Oct 28, 2014
f1fcc45
packaging: generate config file, added W3C-speech dictionary dir.
klihub Nov 7, 2014
97de11d
packaging: bumped version, updated changelog.
klihub Nov 7, 2014
0579f42
initial implementation crosswalk w3c speech extension
Nov 17, 2014
68778e9
packaging: use %config macro for installing configuration file
Nov 18, 2014
b841a53
packaging: bumped version, updated changelog.
klihub Nov 23, 2014
8ad5ea4
[Speech API]: running mainloop in crosswalk extension
Nov 25, 2014
8e3ade4
[W3C-Speech]: Fix issues found in extension code
Nov 25, 2014
552998a
[W3C-Speech]: sample html page to test crosswalk extension
Nov 25, 2014
4ba73b3
[W3C-Speech]: Fix configuration entry of dictionaries entry
Nov 25, 2014
7003ae1
Bug Fix TC-661: SpeechSynthesisUtterance.text has no effect
Dec 9, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,25 @@ AC_ARG_ENABLE(w3c-speech,
if test "$enable_w3cspeech" = "yes"; then
AC_MSG_NOTICE([W3C Speech API plugin is enabled.])
AC_DEFINE([W3C_SPEECH_ENABLED], 1, [Enable W3C Speech API plugin ?])

# Check if W3C Speech API crosswalk extenion was enabled
AC_ARG_ENABLE(w3c-speech-xwalk-extension,
[ --enable-w3c-speech-xwalk-extension enable W3C Speech API xwalk extension],
[enable_w3cspeech_xwalk_extension=$enableval],
[enable_w3cspeech_xwalk_extension=$enable_w3cspeech])

if test "x$enable_w3cspeech_xwalk_extension" = "xyes"; then
AC_MSG_NOTICE([W3C Speech API crosswalk extensionis enabled.])
AC_DEFINE([W3C_SPEECH_XWALK_EXTENSION_ENABLED], 1, [Enabe W3c Speec crosswalk extension])
else
AC_MSG_NOTICE([W3C Speech API crosswalk extension disabled.])
fi
else
AC_MSG_NOTICE([W3C Speech API plugin is disabled.])
fi

AM_CONDITIONAL(W3C_SPEECH_ENABLED, [test "$enable_w3cspeech" = "yes"])
AM_CONDITIONAL(W3C_SPEECH_XWALK_EXTENSION_ENABLED, [test "$enable_w3cspeech_xwalk_extension" = "yes"])

# Check if systemd socket-based activation was enabled.
AC_ARG_ENABLE(systemd,
Expand Down Expand Up @@ -358,6 +372,9 @@ echo "Sphinx support: $enable_sphinx"
echo "Festival support: $enable_festival"
echo "Espeak support: $enable_espeak"
echo "W3C Speech API: $enable_w3cspeech"
if test "$enable_w3cspeech";then
echo "W3C Speech API Crosswalk extension: $enable_w3cspeech_xwalk_extension"
fi
echo "systemd socket-based activation: $enable_systemd"
echo "Bluetooth voice recording support: $enable_bluetooth"
echo "Mediaplayer remote interface support: $enable_mpris"
Expand Down
3 changes: 3 additions & 0 deletions packaging/org.tizen.srs.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[D-BUS Service]
Name=org.tizen.srs
Exec=/usr/lib/srs/scripts/start-speech-service.sh
40 changes: 40 additions & 0 deletions packaging/speech-recognition.changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
* Fri Nov 23 15:24:12 EEST 2014 Krisztian Litkey <[email protected]> - 0.0.10
- w3c-speech: added crosswalk W3C Speech API extension.

* Fri Nov 07 15:24:12 EEST 2014 Krisztian Litkey <[email protected]> - 0.0.9
- packaging: generate config file (to get %{_datadir} right).
- synced with latest upstream, including static analysis fixes.

* Tue Oct 28 16:12:00 EEST 2014 Krisztian Litkey <[email protected]> - 0.0.8
- packaging: enabled W3C speech plugin.
- synced with latest upstream fixes.

* Fri May 23 14:10:15 EEST 2014 Krisztian Litkey <[email protected]> - 0.0.7
- client: (re-)request last focus upon resource connection establishment.
- festival: don't leak rendered sample buffers.

* Tue Mar 11 14:10:15 EEST 2014 Krisztian Litkey <[email protected]> - 0.0.6
- tts: added API support for TTS rate and pitch.
- voice: properly administed cancellation of the active TTS request.
- native-client: return proper request id from srs_render_voice.
- test-client: minor TTS cancellation and help message fixes.

* Wed Jan 15 17:35:21 EEST 2014 Krisztian Litkey <[email protected]> - 0.0.5
- Enable systemd socket-based activation for the native client API.
- TIVI-2079: try autospawning pulseaudio if it is not running.
- Load the wrt-media-client plugin (forgotten in 0.0.4).

* Tue Jan 07 14:02:21 EEST 2014 Krisztian Litkey <[email protected]> - 0.0.4
- A few crash fixes.
- Added native client library.
- Added devel and tests subpackages.

* Thu Sep 12 14:02:21 EEST 2013 Krisztian Litkey <[email protected]> - 0.0.3
- Enabled D-Bus-based activation.

* Wed Sep 11 22:41:20 EEST 2013 Krisztian Litkey <[email protected]> - 0.0.2
- Added and enabled voice/TTS support.
- Fix a shutdown code path corruption.

* Thu Aug 22 10:20:28 EEST 2013 Krisztian Litkey <[email protected]> - 0.0.1
- Initial packaging/release for Tizen IVI.
57 changes: 57 additions & 0 deletions packaging/speech-recognition.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#########################
# plugins we always need (at least currently)
#
load simple-disambiguator

#########################
# sphinx speech engine
#
# default mike input
sphinx.pulsesrc = alsa_input.usb-Logitech_Logitech_USB_Microphone-00-Microphone.analog-mono
# language models and dictionaries
sphinx.hmm = /usr/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k
sphinx.lm = /usr/share/speech-recognition/dictionaries/demo/demo.DMP
sphinx.dict = /usr/share/speech-recognition/dictionaries/demo/demo.dic
sphinx.fsg = /usr/share/speech-recognition/dictionaries/demo/demo.fsg
sphinx.decoder = general
sphinx.general.lm = /usr/share/pocketsphinx/model/lm/en_US/wsj0vp.5000.DMP
sphinx.general.dict = /usr/share/pocketsphinx/model/lm/en_US/cmu07a.dic

load sphinx-speech

#########################
# festival voice engine
#
festival.voices = auto

load festival-loader
load festival-voice

#########################
# MPRIS2 and bluetooth clients (for iPhone control)
#

#mpris2.player1 = Anssi_Kostiainen__Intel____s_iPhone_Music

#load mpris2-client
#load bluetooth-client

#########################
# dumb search plugin
#
search.command = /usr/bin/MiniBrowser "http://google.com/search?q=__url__"

load search-client

#########################
# client API plugins
#
load native-client

w3c-speech.address = unxs:@winthorpe.w3c-speech
w3c-speech.grammars = @DATADIR@/speech-recognition/dictionaries/w3c-speech
load w3c-speech

# wrt-media-client needs GMainLoop
gmainloop = true
load wrt-media-client
11 changes: 11 additions & 0 deletions packaging/speech-recognition.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# PulseAudio source to use for the mike
MIKE="-s sphinx.pulsesrc=alsa_input.usb-Logitech_Logitech_USB_Microphone-00-Microphone.analog-mono"

# built-in clients to load
CLIENTS="-s gmainloop=true -L wrt-media-client"

# plugins to load
PLUGINS="-L simple-disambiguator -L sphinx-speech -L festival-loader -L festival-voice -L native-client"

# basic configuration file
CONFIG="-c /etc/speech-recognition/speech-recognition.conf -P /usr/lib/srs/plugins"
10 changes: 10 additions & 0 deletions packaging/speech-recognition.service.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Winthorpe Speech Recognition and Synthesis Services

[Service]
Type=simple
ExecStart=/usr/sbin/srs-daemon -P @LIBDIR@/srs/plugins -c /etc/speech-recognition/speech-recognition.conf -S native.socket,w3c-speech.socket -f -vvv
KillSignal=SIGTERM

[Install]
WantedBy=multi-user.target
8 changes: 8 additions & 0 deletions packaging/speech-recognition.socket
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Socket]
[email protected]
[email protected]
Accept=false
Accept=false

[Install]
WantedBy=sockets.target
191 changes: 191 additions & 0 deletions packaging/speech-recognition.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
%{!?_with_debug:%{!?_without_debug:%define _with_debug 1}}
%{!?_with_sphinx:%{!?_without_sphinx:%define _with_sphinx 1}}
%{!?_with_festival:%{!?_without_festival:%define _with_festival 1}}
%{!?_with_wrt:%{!?_without_wrt:%define _with_wrt 1}}
%{!?_with_dbus:%{!?_without_dbus:%define _without_dbus 1}}

Summary: Speech recognition service for Tizen
Name: speech-recognition
Version: 0.0.10
Release: 0
License: BSD-3-Clause
Group: Base/Utilities
URL: https://github.com/otcshare/speech-recognition
Source0: %{name}-%{version}.tar.gz

BuildRequires: pkgconfig(libpulse)

BuildRequires: pkgconfig(murphy-common)
BuildRequires: pkgconfig(murphy-pulse)
BuildRequires: pkgconfig(murphy-glib)

BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(json)
%if %{?_with_sphinx:1}%{!?_with_sphinx:0}
BuildRequires: pkgconfig(pocketsphinx)
BuildRequires: pkgconfig(sphinxbase)
%endif
%if %{?_with_festival:1}%{!?_with_festival:0}
BuildRequires: festival-devel
Requires: festival
%endif
%if %{?_with_dbus:1}%{!?_with_dbus:0}
BuildRequires: pkgconfig(dbus-1)
%endif
Requires: pulseaudio
%if %{?_with_sphinx:1}%{!?_with_sphinx:0}
Requires: sphinxbase
Requires: pocketsphinx
%endif
BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: pkgconfig(glib-2.0)

%description
SRS/Winthorpe speech recognition system service.

%package devel
Summary: The header files and libraries needed for SRS/Winthorpe clients
Group: Development/Libraries
Requires: %{name} = %{version}

%description devel
This package contains header files and libraries necessary for development.

%package tests
Summary: Various test binaries for SRS/Winthorpe
Group: Development/Debug
Requires: %{name} = %{version}

%description tests
This package contains various test binaries for SRS/Winthorpe.

%prep
%setup -q -n %{name}-%{version}

%build
%if %{?_with_debug:1}%{!?_with_debug:0}
export CFLAGS="-O0 -g3"
export CXXFLAGS="-O0 -g3"
V="V=1"
%endif
export CXXFLAGS=$CXXFLAGS" -DTIZEN=1"

CONFIG_OPTIONS=""

%if %{?_with_sphinx:1}%{!?_with_sphinx:0}
CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-sphinx"
%else
CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-sphinx"
%endif

%if %{?_with_festival:1}%{!?_with_festival:0}
CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-festival"
%else
CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-festival"
%endif

%if %{?_with_wrt:1}%{!?_with_wrt:0}
CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-wrt-client"
%else
CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-wrt-client"
%endif

%if %{?_with_dbus:1}%{!?_with_dbus:0}
CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-gpl --enable-dbus"
%else
CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-dbus"
%endif

CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-w3c-speech"
CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-systemd"

./bootstrap && \
%configure $CONFIG_OPTIONS && \
make

%install
rm -fr $RPM_BUILD_ROOT

%make_install

# Install dictionaries, configuration and service files.
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} \
$RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition \
$RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition/w3c-grammars \
$RPM_BUILD_ROOT%{_unitdir_user} \
$RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/demo \
$RPM_BUILD_ROOT%{_libdir}/srs/scripts \
$RPM_BUILD_ROOT%{_datadir}/dbus-1/services

cat packaging/speech-recognition.conf.in | \
sed "s#@DATADIR@#%{_datadir}#g" \
> packaging/speech-recognition.conf
cat packaging/speech-recognition.service.in | \
sed "s#@LIBDIR@#%{_libdir}#g" \
> packaging/speech-recognition.service

/usr/bin/install -m 644 packaging/speech-recognition.conf \
$RPM_BUILD_ROOT%{_sysconfdir}/speech-recognition

/usr/bin/install -m 644 packaging/speech-recognition.service \
$RPM_BUILD_ROOT%{_unitdir_user}

/usr/bin/install -m 644 packaging/speech-recognition.socket \
$RPM_BUILD_ROOT%{_unitdir_user}
/usr/bin/install -m 644 \
-t $RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/demo \
dictionaries/demo/demo.*
/usr/bin/install -m 755 packaging/start-speech-service.sh \
$RPM_BUILD_ROOT%{_libdir}/srs/scripts

/usr/bin/install -m 755 packaging/org.tizen.srs.service \
$RPM_BUILD_ROOT%{_datadir}/dbus-1/services

mkdir -p $RPM_BUILD_ROOT%{_datadir}/speech-recognition/dictionaries/w3c-speech

%install_service ../user/weston.target.wants speech-recognition.socket

%clean
rm -rf $RPM_BUILD_ROOT

%post
ldconfig
%systemd_post speech-recognition.service

%preun
%systemd_preun speech-recognition.service

%postun
ldconfig
%systemd_postun speech-recognition.service

%files
%defattr(-,root,root,-)
%{_sbindir}/srs-daemon
%{_libdir}/srs
%{_libdir}/libsrs*.so.*
# crosswalk speech extension.
%{_libdir}/tizen-extensions-crosswalk/*
%config %{_sysconfdir}/speech-recognition/speech-recognition.conf
%dir %{_sysconfdir}/speech-recognition/w3c-grammars
%{_datadir}/speech-recognition/dictionaries
%dir %{_datadir}/speech-recognition/dictionaries/w3c-speech
%{_unitdir_user}/speech-recognition.service
%{_unitdir_user}/speech-recognition.socket
%{_unitdir_user}/weston.target.wants/speech-recognition.socket

%{_datadir}/dbus-1/services/org.tizen.srs.service

%files devel
%defattr(-,root,root,-)
%{_includedir}/srs
%{_libdir}/libsrs*.so
%{_libdir}/pkgconfig/srs*.pc

%files tests
%defattr(-,root,root,-)
%{_bindir}/srs-native-client
%{_bindir}/srs-w3c-client
%if %{?_with_dbus:1}%{!?_with_dbus:0}
%{_bindir}/srs-client
%endif
2 changes: 2 additions & 0 deletions packaging/start-speech-service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec systemctl --user start speech-recognition
6 changes: 3 additions & 3 deletions run-speech-daemon.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

VERBOSITY=${VERBOSITY:--vvv}
PLUGINDIR=${PLUGINDIR:-$(pwd)/src/.libs}
PLUGINDIR=${PLUGINDIR:-/usr/lib/src/plugins/}
CONFIGFILE=${CONFIGFILE:-$(pwd)/speech-recognition.conf}

plugins="simple-disambiguator sphinx-speech simple-voice"
Expand Down Expand Up @@ -76,7 +76,7 @@ EXTRA_OPTIONS=""
while [ -n "$1" ]; do
case $1 in
--valgrind)
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PUGINDIR"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PLUGINDIR"
opts="${1#--valgrind}"
case $opts in
=*) xeq="valgrind ${opts#=}";;
Expand All @@ -90,5 +90,5 @@ while [ -n "$1" ]; do
shift
done

$xeq ./src/srs-daemon -f $VERBOSITY -P $PLUGINDIR -c $CONFIGFILE \
$xeq srs-daemon -f $VERBOSITY -P $PLUGINDIR -c $CONFIGFILE \
$LOAD_OPTIONS $PULSESRC $EXTRA_OPTIONS
Loading