xtd 0.2.0
Loading...
Searching...
No Matches
speech_synthesizer.h
Go to the documentation of this file.
1
4#pragma once
5#include "prompt.h"
9#include "synthesizer_state.h"
10#include "../../event.h"
11#include "../../object.h"
12#include "../../ustring.h"
13
15namespace xtd {
17 namespace speech {
19 namespace synthesis {
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);
68 void speak(xtd::speech::synthesis::prompt& prompt);
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 an event.
Definition event.h:21
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
Represents information about what can be rendered, either text or an audio file, by the xtd::speech::...
Definition prompt.h:34
Provides access to the functionality of an installed speech synthesis engine.
Definition speech_synthesizer.h:33
speech_synthesizer()
Initializes a new instance of the xtd::speech::synthesis::speech_synthesizer class.
synthesizer_state state() const noexcept
Gets the current speaking state of the xtd::speech::speech_synthesizer object.
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
#define core_export_
Define shared library export.
Definition core_export.h:13
delegate< void(object &sender, const speak_started_event_args &e)> speak_started_event_handler
Represents the method that will handle xtd::speech::synthesis::speech_synthesizer::speak_started even...
Definition speak_started_event_handler.h:22
delegate< void(object &sender, const speak_completed_event_args &e)> speak_completed_event_handler
Represents the method that will handle xtd::speech::synthesis::speech_synthesizer::speak_completed ev...
Definition speak_completed_event_handler.h:22
delegate< void(object &sender, const state_changed_event_args &e)> state_changed_event_handler
Represents the method that will handle xtd::speech::synthesis::speech_synthesizer::speak_started even...
Definition state_changed_event_handler.h:22
synthesizer_state
Enumerates values for the state of the xtd::speech::synthesis::speech_synthesizer.
Definition synthesizer_state.h:26
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::speech::synthesis::prompt class.
Contains xtd::speech::synthesis::speak_completed_event_handler alias.
Contains xtd::speech::synthesis::speak_started_event_handler alias.
Contains xtd::speech::synthesis::state_changed_event_handler alias.
Contains xtd::speech::synthesis::synthesizer_state enum class.