navit  0.5.3-trunk
qt5_espeak.cpp File Reference
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <glib.h>
#include "item.h"
#include "attr.h"
#include "debug.h"
#include "file.h"
#include "plugin.h"
#include "speech.h"
#include "util.h"
#include <espeak/speak_lib.h>
#include "Qt5EspeakAudioOut.h"

Data Structures

struct  speech_priv
 

Macros

#define INTERNAL_ESPEAK   0
 
#define BUFFERLENGTH   1000
 
#define SAMPLE_SIZE   16
 

Functions

int qt5_espeak_SynthCallback (short *wav, int numsamples, espeak_EVENT *events)
 
static bool qt5_espeak_init_espeak (struct speech_priv *sr, struct attr **attrs)
 
static bool qt5_espeak_init_language (struct speech_priv *pr, struct attr **attrs)
 
static bool qt5_espeak_init_audio (struct speech_priv *sr, const char *category)
 
static int qt5_espeak_say (struct speech_priv *sr, const char *text)
 
static void qt5_espeak_destroy (struct speech_priv *sr)
 
static struct speech_privqt5_espeak_new (struct speech_methods *meth, struct attr **attrs, struct attr *parent)
 
void plugin_init (void)
 The plugin entry point. More...
 

Variables

static struct speech_methods qt5_espeak_meth
 

Macro Definition Documentation

◆ BUFFERLENGTH

#define BUFFERLENGTH   1000

◆ INTERNAL_ESPEAK

#define INTERNAL_ESPEAK   0

Navit, a modular navigation system. Copyright (C) 2017-2017 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

◆ SAMPLE_SIZE

#define SAMPLE_SIZE   16

Function Documentation

◆ plugin_init()

void plugin_init ( void  )

The plugin entry point.

Returns
nothing

The plugin entry point

References dbg, lvl_debug, and qt5_espeak_new().

◆ qt5_espeak_destroy()

static void qt5_espeak_destroy ( struct speech_priv sr)
static

◆ qt5_espeak_init_audio()

static bool qt5_espeak_init_audio ( struct speech_priv sr,
const char *  category 
)
static

◆ qt5_espeak_init_espeak()

static bool qt5_espeak_init_espeak ( struct speech_priv sr,
struct attr **  attrs 
)
static

◆ qt5_espeak_init_language()

static bool qt5_espeak_init_language ( struct speech_priv pr,
struct attr **  attrs 
)
static

◆ qt5_espeak_new()

◆ qt5_espeak_say()

static int qt5_espeak_say ( struct speech_priv sr,
const char *  text 
)
static

References dbg, lvl_debug, lvl_error, and attr::text.

◆ qt5_espeak_SynthCallback()

int qt5_espeak_SynthCallback ( short *  wav,
int  numsamples,
espeak_EVENT *  events 
)

Variable Documentation

◆ qt5_espeak_meth

struct speech_methods qt5_espeak_meth
static
Initial value:
= {
}
static int qt5_espeak_say(struct speech_priv *sr, const char *text)
Definition: qt5_espeak.cpp:171
static void qt5_espeak_destroy(struct speech_priv *sr)
Definition: qt5_espeak.cpp:183

Referenced by qt5_espeak_new().