acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
aaa_tts_speaker.h
1
#pragma once
2
3
#include <agile.h>
4
5
using namespace
::winrt::Windows::Foundation;
6
using namespace
::winrt::Windows::Foundation::Collections;
7
using namespace
::winrt::Windows::Media::SpeechSynthesis;
8
using namespace
Platform;
9
10
11
namespace
universal_windows
12
{
13
14
15
namespace
tts
16
{
17
18
19
//------------------------------------------------------------------------
20
// Simple class to speak some text (using SAPI).
21
//------------------------------------------------------------------------
22
class
speaker:
23
virtual
public
::tts::speaker
24
{
25
public
:
26
27
28
string_map < Agile < ::winrt::Windows::Media::SpeechSynthesis::SpeechSynthesizer > > m_synth;
29
string_map < ::u32 > m_time;
30
string_map < bool > m_tts;
31
32
33
//--------------------------------------------------------------------
34
// Initializes the text speaker.
35
//--------------------------------------------------------------------
36
speaker();
37
virtual
~speaker();
38
39
virtual
bool
initialize(
string
strLang);
40
virtual
bool
initialize_translator(
string
strLang);
41
virtual
bool
destroy(
string
strLang);
42
virtual
bool
finalize_translator(
string
strLang);
43
44
//--------------------------------------------------------------------
45
// Speaks some text.
46
// (The input text must not be empty.)
47
//--------------------------------------------------------------------
48
virtual
bool
speak(
const
string
& text)
override
;
49
50
virtual
bool
speak(const ::scoped_string & scopedstrLang,
const
string
& text,
bool
bSync =
false
)
override
;
51
52
virtual
bool
is_speaking(
string
strLang)
override
;
53
54
virtual
bool
stop(
string
strLang)
override
;
55
56
IAsyncOperation < SpeechSynthesisStream^ > ^ GetSpeechStreamTask(
string
strLang,
string
strText);
57
58
59
};
60
61
62
}
// namespace tts
63
64
65
}
// namespace universal_windows
66
67
68
69
70
71
universal_windows::tts::speaker
Definition
aaa_tts_speaker.h:24
operating_system
uwp
aaa_tts_speaker.h
Generated by
1.17.0