2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #include <sys/types.h>
21 #include <sys/socket.h>
22 #include <netinet/in.h>
23 #include <arpa/inet.h>
30 #include <libspeechd.h>
39 speechd_say(struct speech_priv *this, const char *text) {
42 err = spd_sayf(this->conn, SPD_MESSAGE, text);
49 speechd_destroy(struct speech_priv *this) {
50 spd_close(this->conn);
54 static struct speech_methods speechd_meth = {
59 static struct speech_priv *
60 speechd_new(struct speech_methods *meth, struct attr **attrs, struct attr *attr) {
61 struct speech_priv *this;
64 conn = spd_open("navit","main",NULL,SPD_MODE_SINGLE);
67 this=g_new(struct speech_priv,1);
71 spd_set_punctuation(conn, SPD_PUNCT_NONE);
80 plugin_register_speech_type("speech_dispatcher", speechd_new);