build-sys: shuffling files around for a development subpackage.
authorKrisztian Litkey <kli@iki.fi>
Sun, 5 Jan 2014 18:18:42 +0000 (20:18 +0200)
committerKrisztian Litkey <kli@iki.fi>
Fri, 10 Jan 2014 15:08:11 +0000 (17:08 +0200)
57 files changed:
configure.ac
src/Makefile.am
src/daemon/audiobuf.c
src/daemon/client.c
src/daemon/config.c
src/daemon/context.h
src/daemon/daemon.c
src/daemon/plugin.c
src/daemon/recognizer.c
src/daemon/voice.c
src/plugins/bluetooth-client/bluetooth-plugin.h
src/plugins/client-api/dbus/Makefile [moved from src/plugins/wrt-media-client/Makefile with 100% similarity]
src/plugins/client-api/dbus/dbus-client.c [moved from src/plugins/dbus-client-interface/dbus-client.c with 99% similarity]
src/plugins/client-api/dbus/dbus-config.h [moved from src/plugins/dbus-client-interface/dbus-config.h with 100% similarity]
src/plugins/client-api/dbus/test-client.c [moved from src/client/client.c with 99% similarity]
src/plugins/client-api/native/Makefile [moved from src/plugins/simple-voice/Makefile with 100% similarity]
src/plugins/client-api/native/native-client.c [moved from src/plugins/native-client-interface/native-client.c with 100% similarity]
src/plugins/client-api/native/native-client.h [moved from src/plugins/native-client-interface/native-client.h with 100% similarity]
src/plugins/client-api/native/native-config.h [moved from src/plugins/native-client-interface/native-config.h with 100% similarity]
src/plugins/client-api/native/native-messages.c [moved from src/plugins/native-client-interface/native-messages.c with 100% similarity]
src/plugins/client-api/native/native-messages.h [moved from src/plugins/native-client-interface/native-messages.h with 100% similarity]
src/plugins/client-api/native/native-server.c [moved from src/plugins/native-client-interface/native-server.c with 99% similarity]
src/plugins/client-api/native/srs-native-client.pc.in [new file with mode: 0644]
src/plugins/client-api/native/test-client.c [moved from src/plugins/native-client-interface/test-client.c with 100% similarity]
src/plugins/client-api/wrt-media-client/Makefile [moved from src/plugins/native-client-interface/Makefile with 100% similarity]
src/plugins/client-api/wrt-media-client/wrt-media-client.c [moved from src/plugins/wrt-media-client/wrt-media-client.c with 99% similarity]
src/plugins/input-handler/input-plugin.c
src/plugins/mpris2-client/mpris2-plugin.h
src/plugins/search-client/search-plugin.c
src/plugins/simple-disambiguator/disambiguator.c
src/plugins/speech-to-text/fake/Makefile [moved from src/plugins/festival/Makefile with 100% similarity]
src/plugins/speech-to-text/fake/fake.c [moved from src/plugins/fake-speech-engine/fake.c with 99% similarity]
src/plugins/speech-to-text/nuance/nuance.c [moved from src/plugins/nuance-speech-engine/nuance.c with 99% similarity]
src/plugins/speech-to-text/sphinx/decoder-set.c [moved from src/plugins/sphinx-speech-engine/decoder-set.c with 99% similarity]
src/plugins/speech-to-text/sphinx/decoder-set.h [moved from src/plugins/sphinx-speech-engine/decoder-set.h with 100% similarity]
src/plugins/speech-to-text/sphinx/filter-buffer.c [moved from src/plugins/sphinx-speech-engine/filter-buffer.c with 99% similarity]
src/plugins/speech-to-text/sphinx/filter-buffer.h [moved from src/plugins/sphinx-speech-engine/filter-buffer.h with 100% similarity]
src/plugins/speech-to-text/sphinx/input-buffer.c [moved from src/plugins/sphinx-speech-engine/input-buffer.c with 100% similarity]
src/plugins/speech-to-text/sphinx/input-buffer.h [moved from src/plugins/sphinx-speech-engine/input-buffer.h with 100% similarity]
src/plugins/speech-to-text/sphinx/options.c [moved from src/plugins/sphinx-speech-engine/options.c with 100% similarity]
src/plugins/speech-to-text/sphinx/options.h [moved from src/plugins/sphinx-speech-engine/options.h with 95% similarity]
src/plugins/speech-to-text/sphinx/pulse-interface.c [moved from src/plugins/sphinx-speech-engine/pulse-interface.c with 98% similarity]
src/plugins/speech-to-text/sphinx/pulse-interface.h [moved from src/plugins/sphinx-speech-engine/pulse-interface.h with 100% similarity]
src/plugins/speech-to-text/sphinx/sphinx-plugin.c [moved from src/plugins/sphinx-speech-engine/sphinx-plugin.c with 100% similarity]
src/plugins/speech-to-text/sphinx/sphinx-plugin.h [moved from src/plugins/sphinx-speech-engine/sphinx-plugin.h with 95% similarity]
src/plugins/speech-to-text/sphinx/utterance.c [moved from src/plugins/sphinx-speech-engine/utterance.c with 99% similarity]
src/plugins/speech-to-text/sphinx/utterance.h [moved from src/plugins/sphinx-speech-engine/utterance.h with 100% similarity]
src/plugins/text-to-speech/festival/Makefile [moved from src/plugins/fake-speech-engine/Makefile with 100% similarity]
src/plugins/text-to-speech/festival/festival-loader.c [moved from src/plugins/festival/festival-loader.c with 99% similarity]
src/plugins/text-to-speech/festival/festival-voice.c [moved from src/plugins/festival/festival-voice.c with 97% similarity]
src/plugins/text-to-speech/festival/festival-voice.h [moved from src/plugins/festival/festival-voice.h with 100% similarity]
src/plugins/text-to-speech/festival/libcarnival.cc [moved from src/plugins/festival/libcarnival.cc with 99% similarity]
src/plugins/text-to-speech/festival/libcarnival.h [moved from src/plugins/festival/libcarnival.h with 100% similarity]
src/plugins/text-to-speech/festival/pulse.c [moved from src/plugins/festival/pulse.c with 99% similarity]
src/plugins/text-to-speech/festival/pulse.h [moved from src/plugins/festival/pulse.h with 97% similarity]
src/plugins/text-to-speech/simple-voice/Makefile [moved from src/plugins/dbus-client-interface/Makefile with 100% similarity]
src/plugins/text-to-speech/simple-voice/simple-voice.c [moved from src/plugins/simple-voice/simple-voice.c with 99% similarity]

index 813937e..cb037a5 100644 (file)
@@ -274,7 +274,7 @@ AC_CONFIG_FILES([build-aux/shave
                 Makefile
                  utils/Makefile
                  src/Makefile
-                 src/plugins/native-client-interface/srs-native.pc
+                 src/plugins/client-api/native/srs-native-client.pc
                 ])
 AC_OUTPUT
 
index 284a07d..2558f8d 100644 (file)
@@ -15,11 +15,10 @@ AM_CFLAGS          = $(GLIB_CFLAGS)
 QUIET_GEN          = $(Q:@=@echo '  GEN   '$@;)
 
 # SRS daemon
-srs_daemon_PUBLIC_SYMBOLS =                    \
-               daemon/context.h                \
-               daemon/audiobuf.h               \
-               daemon/recognizer.h             \
-               daemon/plugin.h
+daemon_includedir  = $(includedir)/srs/daemon
+daemon_include_HEADERS = \
+               daemon/client-api-types.h       \
+               daemon/voice-api-types.h
 
 srs_daemon_SOURCES =                           \
                daemon/daemon.c                 \
@@ -55,13 +54,30 @@ srs_daemon_LDFLAGS =                                \
                -rdynamic
 
 if DBUS_ENABLED
-# SRS command line test client
-bin_PROGRAMS += srs-client
+# D-Bus client API plugin
+plugin_LTLIBRARIES += plugin-dbus-client.la
+
+plugin_dbus_client_la_SOURCES =                \
+               plugins/client-api/dbus/dbus-client.c
+
+plugin_dbus_client_la_CFLAGS =                 \
+               $(AM_CFLAGS)                    \
+               $(DBUS_CFLAGS)                  \
+               $(MURPHY_DBUS_CFLAGS)
 
-srs_client_SOURCES =                           \
-               client/client.c
+plugin_dbus_client_la_LDFLAGS =                        \
+               -module -avoid-version
+
+plugin_dbus_client_la_LIBADD =                 \
+               $(MURPHY_DBUS_LIBS)
+
+# D-Bus client API command line test client
+bin_PROGRAMS += srs-dbus-client
 
-srs_client_CFLAGS =                            \
+srs_dbus_client_SOURCES =                              \
+               plugins/client-api/dbus/test-client.c
+
+srs_dbus_client_CFLAGS =                       \
                $(AM_CFLAGS)                    \
                $(MURPHY_PULSE_CFLAGS)          \
                $(MURPHY_DBUS_CFLAGS)           \
@@ -69,7 +85,7 @@ srs_client_CFLAGS =                           \
                $(MURPHY_COMMON_CFLAGS)         \
                $(DBUS_CFLAGS)
 
-srs_client_LDADD =                             \
+srs_dbus_client_LDADD =                                \
                $(MURPHY_PULSE_LIBS)            \
                $(MURPHY_DBUS_LIBS)             \
                $(MURPHY_BREEDLINE_LIBS)        \
@@ -79,31 +95,12 @@ srs_client_LDADD =                          \
 endif
 
 
-if DBUS_ENABLED
-# D-Bus client interface plugin
-plugin_LTLIBRARIES += plugin-dbus-client.la
-
-plugin_dbus_client_la_SOURCES =                \
-               plugins/dbus-client-interface/dbus-client.c
-
-plugin_dbus_client_la_CFLAGS =                 \
-               $(AM_CFLAGS)                    \
-               $(DBUS_CFLAGS)                  \
-               $(MURPHY_DBUS_CFLAGS)
-
-plugin_dbus_client_la_LDFLAGS =                        \
-               -module -avoid-version
-
-plugin_dbus_client_la_LIBADD =                 \
-               $(MURPHY_DBUS_LIBS)
-endif
-
-# Native client interface plugin
+# native client API plugin
 plugin_LTLIBRARIES += plugin-native-client.la
 
 plugin_native_client_la_SOURCES =                                      \
-               plugins/native-client-interface/native-server.c         \
-               plugins/native-client-interface/native-messages.c
+               plugins/client-api/native/native-server.c               \
+               plugins/client-api/native/native-messages.c
 
 plugin_native_client_la_CFLAGS =               \
                $(AM_CFLAGS)                    \
@@ -115,33 +112,33 @@ plugin_native_client_la_LDFLAGS =         \
 plugin_native_client_la_LIBADD =               \
                $(MURPHY_COMMON_LIBS)
 
-# Native client library
-lib_LTLIBRARIES += libsrs-native.la
-EXTRA_DIST      += plugins/native-client-interface/srs-native.pc
-pkgconfig_DATA  += plugins/native-client-interface/srs-native.pc
+# native client API library
+lib_LTLIBRARIES += libsrs-native-client.la
+EXTRA_DIST      += plugins/client-api/native/srs-native-client.pc
+pkgconfig_DATA  += plugins/client-api/native/srs-native-client.pc
 
-libsrs_native_ladir      = $(includedir)/srs
-libsrs_native_la_HEADERS =     \
-               plugins/native-client-interface/native-client.h \
-               plugins/native-client-interface/native-config.h \
-               plugins/native-client-interface/native-messages.h
+libsrs_native_client_ladir      = $(includedir)/srs/client-api/native
+libsrs_native_client_la_HEADERS =      \
+               plugins/client-api/native/native-client.h \
+               plugins/client-api/native/native-config.h \
+               plugins/client-api/native/native-messages.h
 
-libsrs_native_la_SOURCES =     \
-               plugins/native-client-interface/native-client.c \
-               plugins/native-client-interface/native-messages.c
+libsrs_native_client_la_SOURCES =      \
+               plugins/client-api/native/native-client.c \
+               plugins/client-api/native/native-messages.c
 
-libsrs_native_la_CFLAGS =      \
+libsrs_native_client_la_CFLAGS =       \
                $(AM_CFLAGS)    \
                $(MURPHY_COMMON_CFLAGS)
 
-libsrs_native_la_LIBADD =      \
+libsrs_native_client_la_LIBADD =       \
                $(MURPHY_COMMON_LIBS)
 
 # native client API command line test client
 bin_PROGRAMS += srs-native-client
 
 srs_native_client_SOURCES =                                            \
-               plugins/native-client-interface/test-client.c
+               plugins/client-api/native/test-client.c
 
 srs_native_client_CFLAGS =                     \
                $(AM_CFLAGS)                    \
@@ -156,7 +153,7 @@ srs_native_client_LDADD =                   \
                $(MURPHY_COMMON_LIBS)           \
                $(MURPHY_GLIB_LIBS)             \
                $(PULSE_LIBS)                   \
-               libsrs-native.la
+               libsrs-native-client.la
 
 libsrs_native_client_la_LDFLAGS =      \
                -version-info @SRS_VERSION_INFO@
@@ -165,7 +162,7 @@ libsrs_native_client_la_LDFLAGS =   \
 plugin_LTLIBRARIES += plugin-fake-speech.la
 
 plugin_fake_speech_la_SOURCES =                        \
-               plugins/fake-speech-engine/fake.c
+               plugins/speech-to-text/fake/fake.c
 
 plugin_fake_speech_la_CFLAGS  =                        \
                $(AM_CFLAGS)
@@ -180,13 +177,13 @@ if SPHINX_ENABLED
 plugin_LTLIBRARIES += plugin-sphinx-speech.la
 
 plugin_sphinx_speech_la_SOURCES =                              \
-               plugins/sphinx-speech-engine/sphinx-plugin.c    \
-               plugins/sphinx-speech-engine/pulse-interface.c  \
-               plugins/sphinx-speech-engine/input-buffer.c     \
-               plugins/sphinx-speech-engine/filter-buffer.c    \
-               plugins/sphinx-speech-engine/utterance.c        \
-               plugins/sphinx-speech-engine/decoder-set.c      \
-               plugins/sphinx-speech-engine/options.c
+               plugins/speech-to-text/sphinx/sphinx-plugin.c   \
+               plugins/speech-to-text/sphinx/pulse-interface.c \
+               plugins/speech-to-text/sphinx/input-buffer.c    \
+               plugins/speech-to-text/sphinx/filter-buffer.c   \
+               plugins/speech-to-text/sphinx/utterance.c             \
+               plugins/speech-to-text/sphinx/decoder-set.c     \
+               plugins/speech-to-text/sphinx/options.c
 
 plugin_sphinx_speech_la_CFLAGS  =                      \
                $(AM_CFLAGS)                            \
@@ -205,7 +202,7 @@ endif
 plugin_LTLIBRARIES += plugin-nuance-speech.la
 
 plugin_nuance_speech_la_SOURCES =                      \
-               plugins/nuance-speech-engine/nuance.c
+               plugins/speech-to-text/nuance/nuance.c
 
 plugin_nuance_speech_la_CFLAGS  =                      \
                $(AM_CFLAGS)
@@ -295,7 +292,7 @@ if FESTIVAL_ENABLED
 plugin_LTLIBRARIES += plugin-festival-loader.la
 
 plugin_festival_loader_la_SOURCES =                            \
-               plugins/festival/festival-loader.c
+               plugins/text-to-speech/festival/festival-loader.c
 
 plugin_festival_loader_la_CFLAGS  =                            \
                $(AM_CFLAGS)
@@ -308,10 +305,10 @@ plugin_festival_loader_la_LIBADD = -ldl
 # festival-voice synthesizer plugin
 plugin_LTLIBRARIES += plugin-festival-voice.la
 
-plugin_festival_voice_la_SOURCES =                             \
-               plugins/festival/festival-voice.c               \
-               plugins/festival/libcarnival.cc                 \
-               plugins/festival/pulse.c
+plugin_festival_voice_la_SOURCES =                                     \
+               plugins/text-to-speech/festival/festival-voice.c        \
+               plugins/text-to-speech/festival/libcarnival.cc          \
+               plugins/text-to-speech/festival/pulse.c
 
 plugin_festival_voice_la_CFLAGS  =                             \
                $(AM_CFLAGS)
@@ -329,7 +326,7 @@ endif
 #plugin_LTLIBRARIES += plugin-simple-voice.la
 #
 #plugin_simple_voice_la_SOURCES =                              \
-#              plugins/simple-voice/simple-voice.c
+#              plugins/text-to-speech/simple-voice/simple-voice.c
 #
 #plugin_simple_voice_la_CFLAGS  =                              \
 #              $(AM_CFLAGS)
@@ -361,7 +358,7 @@ if WRTC_ENABLED
 plugin_LTLIBRARIES += plugin-wrt-media-client.la
 
 plugin_wrt_media_client_la_SOURCES =                           \
-               plugins/wrt-media-client/wrt-media-client.c
+               plugins/client-api/wrt-media-client/wrt-media-client.c
 
 plugin_wrt_media_client_la_CFLAGS =                            \
                $(AM_CFLAGS)                                    \
index c47f60e..bacaa4b 100644 (file)
@@ -1,7 +1,7 @@
 #include <murphy/common/mm.h>
 #include <murphy/common/refcnt.h>
 
-#include "src/daemon/audiobuf.h"
+#include "srs/daemon/audiobuf.h"
 
 /*
  * audio buffer handling
index 7a19f70..26fa74e 100644 (file)
@@ -30,9 +30,9 @@
 #include <murphy/common/mm.h>
 #include <murphy/common/log.h>
 
-#include "src/daemon/resctl.h"
-#include "src/daemon/recognizer.h"
-#include "src/daemon/client.h"
+#include "srs/daemon/resctl.h"
+#include "srs/daemon/recognizer.h"
+#include "srs/daemon/client.h"
 
 typedef struct {
     mrp_list_hook_t  hook;               /* to list of voice requests */
index 10c8432..35808c8 100644 (file)
@@ -43,9 +43,9 @@
 #include <murphy/common/mm.h>
 #include <murphy/common/log.h>
 
-#include "src/daemon/context.h"
-#include "src/daemon/plugin.h"
-#include "src/daemon/config.h"
+#include "srs/daemon/context.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/config.h"
 
 #ifndef PATH_MAX
 #    define PATH_MAX 1024
index 2546e05..f5d2ae2 100644 (file)
@@ -43,8 +43,8 @@
 /** SRS daemon context type. */
 typedef struct srs_context_s srs_context_t;
 
-#include "src/daemon/config.h"
-#include "src/daemon/resctl.h"
+#include "srs/daemon/config.h"
+#include "srs/daemon/resctl.h"
 
 /*
  * daemon context
index e9d2133..bc6dc7d 100644 (file)
 
 #include <glib-object.h>
 
-#include "src/daemon/context.h"
-#include "src/daemon/config.h"
-#include "src/daemon/resctl.h"
-#include "src/daemon/plugin.h"
-#include "src/daemon/client.h"
-#include "src/daemon/recognizer.h"
-
+#include "srs/daemon/context.h"
+#include "srs/daemon/config.h"
+#include "srs/daemon/resctl.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/client.h"
+#include "srs/daemon/recognizer.h"
 
 static void cleanup_mainloop(srs_context_t *srs);
 static void resctl_state_change(srs_resctl_event_t *e, void *user_data);
index e0b24b1..fcbb223 100644 (file)
@@ -33,8 +33,8 @@
 
 #include <murphy/common/mm.h>
 
-#include "src/daemon/context.h"
-#include "src/daemon/plugin.h"
+#include "srs/daemon/context.h"
+#include "srs/daemon/plugin.h"
 
 static srs_plugin_t *find_plugin(srs_context_t *srs, const char *name)
 {
index 085edd4..d66391b 100644 (file)
@@ -33,9 +33,9 @@
 
 #include <murphy/common/list.h>
 
-#include "src/daemon/context.h"
-#include "src/daemon/voice.h"
-#include "src/daemon/recognizer.h"
+#include "srs/daemon/context.h"
+#include "srs/daemon/voice.h"
+#include "srs/daemon/recognizer.h"
 
 
 /*
index ba4cdce..ddc3a7a 100644 (file)
@@ -34,8 +34,8 @@
 #include <murphy/common/mm.h>
 #include <murphy/common/list.h>
 
-#include "src/daemon/context.h"
-#include "src/daemon/voice.h"
+#include "srs/daemon/context.h"
+#include "srs/daemon/voice.h"
 
 typedef struct state_s state_t;
 
index 3d91f61..b5f0b67 100644 (file)
@@ -4,8 +4,8 @@
 #include <stdint.h>
 #include <stdbool.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/client.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/client.h"
 
 #define PLUGIN_NAME           "bluetooth-voice-recognition"
 #define BLUETOOTH_PREFIX      "bluetooth."
similarity index 99%
rename from src/plugins/dbus-client-interface/dbus-client.c
rename to src/plugins/client-api/dbus/dbus-client.c
index 601e43b..95f471a 100644 (file)
@@ -34,8 +34,9 @@
 #include <murphy/common/debug.h>
 #include <murphy/common/dbus-libdbus.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/client.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/client.h"
+
 #include "dbus-config.h"
 
 #define PLUGIN_NAME    "dbus-client"
similarity index 99%
rename from src/client/client.c
rename to src/plugins/client-api/dbus/test-client.c
index f7b9b52..4b9ac3e 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <breedline/breedline-murphy.h>
 
-#include "plugins/dbus-client-interface/dbus-config.h"
+#include "dbus-config.h"
 
 
 static const char *default_commands[] = {
@@ -37,8 +37,9 @@
 #include <murphy/common/transport.h>
 #include <murphy/common/native-types.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/client.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/client.h"
+
 #include "native-messages.h"
 #include "native-config.h"
 
diff --git a/src/plugins/client-api/native/srs-native-client.pc.in b/src/plugins/client-api/native/srs-native-client.pc.in
new file mode 100644 (file)
index 0000000..77b0cdd
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: srs-native-client
+Description: SRS native client library
+Requires: murphy-common
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lsrs-native-client -lmurphy-common
+Cflags: -I${includedir}
@@ -35,8 +35,8 @@
 
 #include <gio/gio.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/client.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/client.h"
 
 #define WRTC_NAME    "wrt-media-client"
 #define WRTC_DESCR   "A demo WRT media player relay client."
index 473e864..e2e9479 100644 (file)
@@ -43,9 +43,9 @@
 
 #include <murphy/common/debug.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/context.h"
-#include "src/daemon/recognizer.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/context.h"
+#include "srs/daemon/recognizer.h"
 
 #define PLUGIN_NAME    "input-handler"
 #define PLUGIN_DESCR   "For activating/deactivating voice recognition"
index a9052e5..e81b32e 100644 (file)
@@ -4,8 +4,8 @@
 #include <stdint.h>
 #include <stdbool.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/client.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/client.h"
 
 #define PLUGIN_NAME    "music-player"
 #define MPRIS2_PREFIX  "mpris2."
index 024e2b9..5e27968 100644 (file)
@@ -31,8 +31,8 @@
 
 #include <murphy/common/debug.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/client.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/client.h"
 
 #define SEARCH_NAME    "search-client"
 #define SEARCH_DESCR   "A trivial search plugin for SRS."
index dd56158..137246d 100644 (file)
@@ -6,9 +6,9 @@
 #include <murphy/common/log.h>
 #include <murphy/common/debug.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/client.h"
-#include "src/daemon/recognizer.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/client.h"
+#include "srs/daemon/recognizer.h"
 
 #define DISAMB_NAME     "simple-disambiguator"
 #define DISAMB_INFO     "A test disambiguator."
similarity index 99%
rename from src/plugins/fake-speech-engine/fake.c
rename to src/plugins/speech-to-text/fake/fake.c
index 7a02b49..f1b3762 100644 (file)
@@ -30,8 +30,8 @@
 #include <murphy/common/debug.h>
 #include <murphy/common/mainloop.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/recognizer.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/recognizer.h"
 
 #define FAKE_NAME        "fake-speech"
 #define FAKE_DESCRIPTION "A fake/test SRS speech engine to test the infra."
similarity index 99%
rename from src/plugins/nuance-speech-engine/nuance.c
rename to src/plugins/speech-to-text/nuance/nuance.c
index bf470ce..842c0ed 100644 (file)
@@ -30,8 +30,8 @@
 #include <murphy/common/debug.h>
 #include <murphy/common/mainloop.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/recognizer.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/recognizer.h"
 
 #define NUANCE_NAME        "nuance-speech"
 #define NUANCE_DESCRIPTION "A Nuance-based speech engine backend plugin."
@@ -154,7 +154,7 @@ int decoder_set_add(context_t *ctx, const char *decoder_name,
 
     if (fsg)
         cmd_ln_set_str_r(cfg, "-fsg", fsg);
-    
+
     if (!(ps = ps_init(cfg)))
         return -1;
 
@@ -176,7 +176,7 @@ int decoder_set_add(context_t *ctx, const char *decoder_name,
             model = fsg_set_iter_fsg(sit);
             modnam = fsg_model_name(model);
             fsgs[nfsg] = mrp_strdup(modnam ? modnam : "<anonymous>");
-            
+
             mrp_log_info("   %s", fsgs[nfsg]);
         }
 
@@ -93,7 +93,7 @@ void filter_buffer_initialize(context_t *ctx,
     filtbuf->buf = mrp_alloc((bufsiz + silence) * sizeof(int16_t));
     filtbuf->max = bufsiz;
     filtbuf->hwm = hwm;
-    filtbuf->silen = silen;    
+    filtbuf->silen = silen;
 
     if (ctx->verbose) {
         mrp_debug("frame length %d samples", filtbuf->frlen);
@@ -136,7 +136,7 @@ void filter_buffer_purge(context_t *ctx, int32_t length)
     if (length > 0) {
         if (length == filtbuf->len) {
             filtbuf->len = 0;     /* nothing to preserve */
-            
+
             if (ctx->verbose)
                 mrp_debug("purging buffer. nothing preserved");
         }
@@ -199,7 +199,7 @@ void filter_buffer_process_data(context_t *ctx)
         }
 
         utterance_start(ctx);
-        
+
         if (filtbuf->len >= filtbuf->hwm)
             filter_buffer_utter(ctx, false);
     }
similarity index 95%
rename from src/plugins/sphinx-speech-engine/options.h
rename to src/plugins/speech-to-text/sphinx/options.h
index 9ea3b31..37f3fec 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __SRS_POCKET_SPHINX_OPTIONS_H__
 #define __SRS_POCKET_SPHINX_OPTIONS_H__
 
-#include "src/daemon/config.h"
+#include "srs/daemon/config.h"
 
 #include "sphinx-plugin.h"
 
@@ -191,7 +191,7 @@ static int stream_create(context_t *ctx)
             mrp_log_error("failed to create input stream");
             return -1;
         }
-        
+
         if (target < (minreq * 3))
             target = minreq * 3;
 
@@ -205,7 +205,7 @@ static int stream_create(context_t *ctx)
         battr.minreq    = minsiz;
         battr.prebuf    = 2 * tlength;
         battr.fragsize  = tlength;
-        
+
         flags = PA_STREAM_ADJUST_LATENCY;
 
         pa_stream_set_state_callback(pulseif->stream, state_callback, ctx);
@@ -234,27 +234,27 @@ static void state_callback(pa_stream *stream, void *userdata)
     pa_context_state_t ctxst = pa_context_get_state(pactx);
     int err;
     const char *strerr;
-    
+
     if (ctxst != PA_CONTEXT_TERMINATED && ctxst != PA_CONTEXT_FAILED) {
 
         switch (pa_stream_get_state(stream)) {
-            
+
         case PA_STREAM_CREATING:
             CHECK_STREAM(pulseif, stream);
             mrp_debug("sphinx plugin: pulseaudio input stream creating");
             break;
-            
+
         case PA_STREAM_TERMINATED:
             CHECK_STREAM(pulseif, stream);
             mrp_log_info("sphinx plugin: pulseaudio input stream terminated");
             pulseif->stream = NULL;
             break;
-            
+
         case PA_STREAM_READY:
             CHECK_STREAM(pulseif, stream);
             mrp_log_info("sphinx plugin: pulseaudio input stream is ready");
             break;
-            
+
         case PA_STREAM_FAILED:
         default:
             if ((err = pa_context_errno(pactx))) {
@@ -330,27 +330,27 @@ static void context_callback(pa_context *pactx, void *userdata)
         pulseif->conup = false;
         mrp_debug("sphinx plugin: connecting to pulseaudio server");
         break;
-        
+
     case PA_CONTEXT_AUTHORIZING:
         pulseif->conup = false;
         mrp_debug("   sphinx plugin: authorizing");
         break;
-        
+
     case PA_CONTEXT_SETTING_NAME:
         pulseif->conup = false;
         mrp_debug("   sphinx plugin: setting name");
         break;
-        
+
     case PA_CONTEXT_READY:
         pulseif->conup = true;
         mrp_log_info("sphinx plugin: pulseaudio connection established");
         stream_create(ctx);
         break;
-        
+
     case PA_CONTEXT_TERMINATED:
         mrp_log_info("sphinx plugin: pulseaudio connection terminated");
         goto disconnect;
-        
+
     case PA_CONTEXT_FAILED:
     default:
         if ((err = pa_context_errno(pactx)) != 0) {
@@ -373,7 +373,7 @@ static void event_callback(pa_context *pactx,pa_subscription_event_type_t type,
     pulse_interface_t *pulseif = ctx->pulseif;
 
     (void)idx;
-  
+
     if (pulseif->pactx != pactx) {
         mrp_log_error("sphinx plugin: %s() confused with data structures",
                       __FUNCTION__);
@@ -4,8 +4,8 @@
 #include <stdint.h>
 #include <stdbool.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/recognizer.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/recognizer.h"
 
 typedef enum utterance_processor_e  utterance_processor_t;
 
similarity index 99%
rename from src/plugins/sphinx-speech-engine/utterance.c
rename to src/plugins/speech-to-text/sphinx/utterance.c
index 95c7def..5465546 100644 (file)
@@ -163,19 +163,19 @@ static void acoustic_processor(context_t *ctx,
         if ((seg  = ps_nbest_seg(nb, &score))) {
             while (seg && strcmp(ps_seg_word(seg), "<s>"))
                 seg = ps_seg_next(seg);
-            
+
             if (!seg)
                 continue;
-                
+
             ps_seg_frames(seg, &start, &end);
-                
+
             cand = cands + ncand;
-                
+
             cand->score = logmath_exp(lmath, score) / prob;
             cand->ntoken = 0;
-                
+
             length = 0;
-                
+
             while ((seg = ps_seg_next(seg))) {
                 if ((hyp = ps_seg_word(seg))) {
                     if (!strcmp(hyp, "</s>") ||
@@ -204,13 +204,13 @@ static void acoustic_processor(context_t *ctx,
                     }
                 }
             } /* while seg */
-            
+
             if (!seg && cand->ntoken > 0) {
                 ncand++;
                 cand->score *= 0.9; /* some penalty */
                 //memset(cand+1, 0, sizeof(srs_srec_candidate_t));
             }
-            
+
             if (!length) {
                 tkn = cand->tokens + (cand->ntoken - 1);
                 length = tkn->end;
@@ -219,7 +219,7 @@ static void acoustic_processor(context_t *ctx,
     } /* for nb */
 
     memset(cand+1, 0, sizeof(srs_srec_candidate_t));
-    
+
     utt->id = uttid;
     utt->score = prob;
     //utt->length = length;
@@ -41,8 +41,8 @@
 #include <murphy/common/debug.h>
 #include <murphy/common/mainloop.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/voice.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/voice.h"
 
 #define PLUGIN_NAME    "festival-loader"
 #define PLUGIN_AUTHORS "Krisztian Litkey <kli@iki.fi>"
similarity index 97%
rename from src/plugins/festival/festival-voice.c
rename to src/plugins/text-to-speech/festival/festival-voice.c
index 250cc71..4970d31 100644 (file)
 #include <murphy/common/debug.h>
 #include <murphy/common/mainloop.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/voice.h"
-#include "srs/plugins/festival/festival-voice.h"
-#include "src/plugins/festival/libcarnival.h"
-#include "srs/plugins/festival/pulse.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/voice.h"
+
+#include "festival-voice.h"
+#include "libcarnival.h"
+#include "pulse.h"
 
 #define PLUGIN_NAME    "festival-voice"
 #define PLUGIN_DESCR   "A festival-based voice synthesizer plugin for SRS."
similarity index 99%
rename from src/plugins/festival/libcarnival.cc
rename to src/plugins/text-to-speech/festival/libcarnival.cc
index 924fc2c..07a9d1c 100644 (file)
@@ -11,7 +11,7 @@
 #include <murphy/common/mm.h>
 #include <murphy/common/list.h>
 
-#include "src/plugins/festival/libcarnival.h"
+#include "libcarnival.h"
 
 typedef struct {
     char            *name;               /* unique voice name */
similarity index 99%
rename from src/plugins/festival/pulse.c
rename to src/plugins/text-to-speech/festival/pulse.c
index 721a97c..0ab8532 100644 (file)
@@ -6,8 +6,8 @@
 #include <murphy/common/list.h>
 #include <murphy/common/refcnt.h>
 
-#include "src/plugins/festival/festival-voice.h"
-#include "src/plugins/festival/pulse.h"
+#include "festival-voice.h"
+#include "pulse.h"
 
 #define SPEECH "speech"
 #define TTS    "text-to-speech"
similarity index 97%
rename from src/plugins/festival/pulse.h
rename to src/plugins/text-to-speech/festival/pulse.h
index f7b68e3..703160b 100644 (file)
@@ -5,7 +5,7 @@
 #include <murphy/common/macros.h>
 #include <pulse/pulseaudio.h>
 
-#include "src/plugins/festival/festival-voice.h"
+#include "festival-voice.h"
 
 MRP_CDECL_BEGIN
 
@@ -37,8 +37,8 @@
 #include <murphy/common/debug.h>
 #include <murphy/common/mainloop.h>
 
-#include "src/daemon/plugin.h"
-#include "src/daemon/voice.h"
+#include "srs/daemon/plugin.h"
+#include "srs/daemon/voice.h"
 
 #define FESTIVAL "/usr/bin/festival --tts"
 #define PAPLAY   "/usr/bin/paplay"