-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMain.frm
155 lines (132 loc) · 3.92 KB
/
Main.frm
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
VERSION 5.00
Object = "{5A80A7F3-4AC0-44B4-B684-1F18ADC68C4D}#1.0#0"; "LTTS7.ocx"
Begin VB.Form frmMain
BorderStyle = 1 'Fixed Single
Caption = "Loquendo TTS Sample"
ClientHeight = 4830
ClientLeft = 45
ClientTop = 330
ClientWidth = 7710
Icon = "Main.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4830
ScaleWidth = 7710
StartUpPosition = 3 'Windows Default
Begin LTTS7Lib.LTTS7 objLTTS
Height = 495
Left = 6840
TabIndex = 6
TabStop = 0 'False
Top = 4200
Visible = 0 'False
Width = 735
_Version = 65536
_ExtentX = 1296
_ExtentY = 873
_StockProps = 0
End
Begin VB.CommandButton btnRecord
Caption = "Record to &file"
Enabled = 0 'False
Height = 375
Left = 6240
TabIndex = 5
Top = 2160
Width = 1215
End
Begin VB.CommandButton btnPause
Caption = "&Pause"
Enabled = 0 'False
Height = 375
Left = 6240
TabIndex = 4
Top = 1320
Width = 1215
End
Begin VB.TextBox txtInput
Height = 1695
Left = 1200
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
Top = 840
Width = 4815
End
Begin VB.Label Label4
Caption = "&Language:"
Height = 255
Left = 3840
TabIndex = 1
Top = 240
Width = 855
End
Begin VB.Label Label3
Caption = "&Voice:"
Height = 255
Left = 240
TabIndex = 0
Top = 240
Width = 615
End
Begin VB.Label Label1
Caption = "&Insert text:"
Height = 255
Left = 240
TabIndex = 2
Top = 840
Width = 855
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub lbEvents_Click()
End Sub
Private Sub btnRecord_Click()
Static sFileName, sLastFileName As String
If Trim(txtInput) = "" Then
MsgBox "No text specified!"
Exit Sub
End If
If sLastFileName = "" Then sLastFileName = "c:\Sample.wav"
sFileName = InputBox("Please enter a full file pathname:", , sLastFileName)
If Trim(sFileName) = "" Then
MsgBox "No name specified: record aborted!"
Exit Sub
End If
sLastFileName = sFileName
MousePointer = vbHourglass
If Not objLTTS.Record(txtInput, sFileName) Then
MousePointer = vbDefault
MsgBox "Error while recording to file!"
Exit Sub
End If
MousePointer = vbDefault
End Sub
Sub Exit_Form()
MsgBox ("ok")
End Sub
Sub Form_Load()
Dim s As String
Dim m As String
Dim txtInput As String
Dim sampleString As String
'm = objLTTS.Left
txtInput = Command
objLTTS.Language = "EnglishUs"
objLTTS.Voice = "Allison"
objLTTS.AudioChannels = "Stereo"
objLTTS.Frequency = "48000"
'txtInput = "\item=Laugh"
objLTTS.Read txtInput
frmMain.Hide
'Gosub Exit _Form()
End Sub
Private Sub objLTTS_EndOfSpeech()
End
End Sub