/
PhonemeEventArgs.cs
63 lines (52 loc) · 1.67 KB
/
PhonemeEventArgs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Speech.Synthesis
{
public class PhonemeReachedEventArgs : PromptEventArgs
{
#region Constructors
internal PhonemeReachedEventArgs(Prompt prompt, string currentPhoneme, TimeSpan audioPosition, TimeSpan duration, SynthesizerEmphasis emphasis, string nextPhoneme) : base(prompt)
{
_currentPhoneme = currentPhoneme;
_audioPosition = audioPosition;
_duration = duration;
_emphasis = emphasis;
_nextPhoneme = nextPhoneme;
}
#endregion
#region Public Properties
public string Phoneme
{
get { return _currentPhoneme; }
}
public TimeSpan AudioPosition
{
get { return _audioPosition; }
}
public TimeSpan Duration
{
get { return _duration; }
}
public SynthesizerEmphasis Emphasis
{
get { return _emphasis; }
}
public string NextPhoneme
{
get { return _nextPhoneme; }
}
#endregion
#region Private Fields
// Current phoneme being synthesized
private string _currentPhoneme;
// Audio position of current phoneme
private TimeSpan _audioPosition;
// Duration of current phoneme
private TimeSpan _duration;
// Features of the current phoneme
private SynthesizerEmphasis _emphasis;
// Next phoneme to be synthesized
private string _nextPhoneme;
#endregion
}
}