• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeaccessibility API Reference
  • KDE Home
  • Contact Us
 

jovie

  • sources
  • kde-4.12
  • kdeaccessibility
  • jovie
  • jovie
ssmlconvert.h
Go to the documentation of this file.
1 /***************************************************** vim:set ts=4 sw=4 sts=4:
2  SSMLConvert class
3 
4  This class is in charge of converting SSML text into a format that can
5  be handled by individual synths.
6  -------------------
7  Copyright:
8  (C) 2004 by Paul Giannaros <ceruleanblaze@gmail.com>
9  (C) 2004 by Gary Cramblitt <garycramblitt@comcast.net>
10  -------------------
11  Original author: Paul Giannaros <ceruleanblaze@gmail.com>
12 ******************************************************************************/
13 
14 /***************************************************************************
15  * *
16  * This program is free software; you can redistribute it and/or modify *
17  * it under the terms of the GNU General Public License as published by *
18  * the Free Software Foundation; version 2 of the License or *
19  * (at your option) any later version. *
20  * *
21  ***************************************************************************/
22 
23 #ifndef SSMLCONVERT_H
24 #define SSMLCONVERT_H
25 
34 // Qt includes
35 #include <QtCore/QObject>
36 #include <QtCore/QStringList>
37 
38 class QProcess;
39 class QString;
40 
41 class SSMLConvert : public QObject {
42  Q_OBJECT
43 public:
45  SSMLConvert();
46  explicit SSMLConvert(const QStringList &talkers);
48  virtual ~SSMLConvert();
49 
50  enum TransformState {
51  tsIdle = 0, // Not doing anything. Ready to transform.
52  tsTransforming = 1, // Transforming.
53  tsFinished = 2 // Transforming finished.
54  };
55 
60  void setTalkers(const QStringList &talkers);
61 
67  QString extractTalker(const QString &talkercode);
68 
83  QString appropriateTalker(const QString &text) const;
84 
94  bool transform(const QString &text, const QString &xsltFilename);
95 
99  int getState();
100 
104  QString getOutput();
105 
106 signals:
110  void transformFinished();
111 
112 private slots:
113  void slotProcessExited();
114 
115 private:
117  QProcess *m_xsltProc;
119  QStringList m_talkers;
120  // Current state.
121  int m_state;
122  // Name of XSLT file.
123  QString m_xsltFilename;
124  // Name of temporary input file.
125  QString m_inFilename;
126  // Name of temporary output file.
127  QString m_outFilename;
128 };
129 
130 #endif // SSMLCONVERT_H
SSMLConvert::SSMLConvert
SSMLConvert()
Constructors.
Definition: ssmlconvert.cpp:41
SSMLConvert::tsIdle
Definition: ssmlconvert.h:51
SSMLConvert::TransformState
TransformState
Definition: ssmlconvert.h:50
SSMLConvert::tsTransforming
Definition: ssmlconvert.h:52
QObject
SSMLConvert::transform
bool transform(const QString &text, const QString &xsltFilename)
Applies the spreadsheet for a talker to the SSML and returns the talker-native output.
Definition: ssmlconvert.cpp:206
SSMLConvert
Definition: ssmlconvert.h:41
SSMLConvert::getState
int getState()
Returns current processing state.
Definition: ssmlconvert.cpp:262
SSMLConvert::tsFinished
Definition: ssmlconvert.h:53
SSMLConvert::~SSMLConvert
virtual ~SSMLConvert()
Destructor.
Definition: ssmlconvert.cpp:55
SSMLConvert::appropriateTalker
QString appropriateTalker(const QString &text) const
Returns the most appropriate talker for the text to synth's talker code.
Definition: ssmlconvert.cpp:106
SSMLConvert::getOutput
QString getOutput()
Returns the output from call to transform.
Definition: ssmlconvert.cpp:267
SSMLConvert::setTalkers
void setTalkers(const QStringList &talkers)
Set the talker codes to be used.
Definition: ssmlconvert.cpp:62
SSMLConvert::transformFinished
void transformFinished()
Emitted whenever tranforming is completed.
SSMLConvert::extractTalker
QString extractTalker(const QString &talkercode)
Extract the synth name from a talker code (i.e festival, flite, freetts).
Definition: ssmlconvert.cpp:66
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:32:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

jovie

Skip menu "jovie"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeaccessibility API Reference

Skip menu "kdeaccessibility API Reference"
  • jovie

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal