xtd 0.2.0
speech_synthesizer.h
Go to the documentation of this file.
1 #pragma once
5 #include "prompt.h"
9 #include "synthesizer_state.h"
10 #include "../../event.h"
11 #include "../../object.h"
12 #include "../../ustring.h"
13 
15 namespace xtd {
17  namespace speech {
19  namespace synthesis {
33  class core_export_ speech_synthesizer : public xtd::object {
34  struct data;
35 
36 
37  public:
39 
45 
49 
51 
55  synthesizer_state state() const noexcept;
57 
59 
64  void speak(const xtd::ustring& text_to_speak);
69 
73  xtd::speech::synthesis::prompt& speak_async(const xtd::ustring& text_to_speak);
76  void speak_async(xtd::speech::synthesis::prompt& prompt);
78 
80 
85 
89 
95 
96  private:
97  void on_speak_completed();
98  void on_speak_started();
99  void set_state(synthesizer_state value);
100 
101  std::shared_ptr<data> data_;
102  };
103  }
104  }
105 }
Represents information about what can be rendered, either text or an audio file, by the xtd::speech::...
Definition: prompt.h:34
Contains xtd::speech::synthesis::prompt class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Represents an event.
Definition: event.h:21
Provides access to the functionality of an installed speech synthesis engine.
Definition: speech_synthesizer.h:33
Contains xtd::speech::synthesis::state_changed_event_handler alias.
event< speech_synthesizer, state_changed_event_handler > state_changed
Raised when the state of the xtd::speech::synthesis::speech_synthesizer changes.
Definition: speech_synthesizer.h:93
event< speech_synthesizer, speak_started_event_handler > speak_started
Raised when the xtd::speech::synthesis::speech_synthesizer begins the speaking of a prompt...
Definition: speech_synthesizer.h:88
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
event< speech_synthesizer, speak_completed_event_handler > speak_completed
Raised when the xtd::speech::synthesis::speech_synthesizer completes the speaking of a prompt...
Definition: speech_synthesizer.h:84
Contains xtd::speech::synthesis::speak_completed_event_handler alias.
Contains xtd::speech::synthesis::synthesizer_state enum class.
Contains xtd::speech::synthesis::speak_started_event_handler alias.
synthesizer_state
Enumerates values for the state of the xtd::speech::synthesis::speech_synthesizer.
Definition: synthesizer_state.h:26