xtd 0.2.0
xtd::speech::synthesis::prompt Class Reference

Definition

Represents information about what can be rendered, either text or an audio file, by the xtd::speech::synthesis::speech_synthesizer.

class core_export_ prompt : public xtd::object
Inheritance
xtd::objectxtd::speech::synthesis::prompt
Header
#include <xtd/speech/synthesis/prompt>
Namespace
xtd::speech::synthesis
Library
xtd.core
Remarks
A xtd::speech::synthesis::prompt object can contain plain text, text formatted with markup language, or audio files.
An empty xtd::speech::synthesis::prompt object is created with each new instance of xtd::speech::synthesis::prompt_builder. The xtd::speech::synthesis::prompt_builder class provides methods for adding content, including text, SSML markup, bookmarks, and prerecorded audio files (such as .wav files), to the empty xtd::speech::synthesis::prompt object that it contains. Typically, applications will use xtd::speech::synthesis::prompt_builder, rather than a xtd::speech::synthesis::prompt object, to create prompts and populate them with content.
To generate speech from the contents of a xtd::speech::synthesis::prompt object, use the xtd::speech::synthesis::speach_synthesizer::speak method.

Constructors

 prompt (const xtd::ustring &text_to_speak)
 Initializes a new instance of the xtd::speech::synthesis::speech_synthesizer class. More...
 

Properties

bool is_completed () const noexcept
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object. More...
 
bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object. More...
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type. More...
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance. More...
 
template<typename object_t >
std::unique_ptr< object_t > memberwise_clone () const noexcept
 Creates a shallow copy of the current object. More...
 
virtual xtd::ustring to_string () const noexcept
 Returns a sxd::ustring that represents the current object. More...
 
- Static Public Member Functions inherited from xtd::object
static bool equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are considered equal. More...
 
static bool reference_equals (const object &object_a, const object &object_b) noexcept
 Determines whether the specified object instances are the same instance. More...
 

Constructor & Destructor Documentation

◆ prompt()

xtd::speech::synthesis::prompt::prompt ( const xtd::ustring text_to_speak)
explicit

Initializes a new instance of the xtd::speech::synthesis::speech_synthesizer class.

Remarks
When you initialize a new xtd::speech::synthesis::speech_synthesizer instance, it uses the default system voice. To configure the xtd::speech::synthesis::speech_synthesizer to use one of the installed speech synthesis (text-to-speech) voices, use the xtd::speech::synthesis::speech_synthesizer::select_voice or xtd::speech::synthesis::speech_synthesizer::select_voice_by_hints method. To get information about which voices are installed, use the xtd::speech::synthesis::speech_synthesizer::get_installed_voices method and the xtd::speech::synthesis::voice_info class.

The documentation for this class was generated from the following file: