xtd 0.2.0
Loading...
Searching...
No Matches
speech_synthesizer.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "prompt.hpp"
10#include "../../event.hpp"
11#include "../../object.hpp"
12#include "../../string.hpp"
13
15namespace xtd {
17 namespace speech {
19 namespace synthesis {
36 struct data;
37
38
39 public:
41
47
51
53
57 synthesizer_state state() const noexcept;
59
61
66 void speak(const xtd::string& text_to_speak);
70 void speak(xtd::speech::synthesis::prompt& prompt);
71
75 xtd::speech::synthesis::prompt& speak_async(const xtd::string& text_to_speak);
78 void speak_async(xtd::speech::synthesis::prompt& prompt);
80
82
87
91
97
98 private:
99 void on_speak_completed();
100 void on_speak_started();
101 void set_state(synthesizer_state value);
102
103 xtd::sptr<data> data_;
104 };
105 }
106 }
107}
Represents an event.
Definition event.hpp:21
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
Represents information about what can be rendered, either text or an audio file, by the xtd::speech::...
Definition prompt.hpp:36
Provides access to the functionality of an installed speech synthesis engine.
Definition speech_synthesizer.hpp:35
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.
#define core_export_
Define shared library export.
Definition core_export.hpp: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.hpp:24
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.hpp:24
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.hpp:24
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
synthesizer_state
Enumerates values for the state of the xtd::speech::synthesis::speech_synthesizer.
Definition synthesizer_state.hpp:28
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp: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.