-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
executable file
·111 lines (87 loc) · 4.86 KB
/
index.html
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
<!DOCTYPE HTML>
<html>
<head>
<title>PhoneGap Speech Demo</title>
</head>
<body>
<link type="text/css" rel="stylesheet" href="css/sample.css"></link>
<!-- Buttons for testing -->
<!--
<input id="init-speech" onclick="doInit()" type="button" value="Init Speech" />
<input id="cleanup" onclick="doCleanup()" type="button" value="Cleanup" />
<hr>
-->
<div class="tab-set" id="tab-set">
<div id="tab-list" class="tab-list" >
<a>Recognition</a>
<a>TTS</a>
</div>
<div id="tab-content" class="tab-content">
<div class="tab-data">
<P>Recognition Type:
<SELECT id="reco-type" width="100%" SINGLE>
<OPTION selected="selected" value="dictation">Dictation</OPTION>
<OPTION value="websearch">Web Search</OPTION>
</SELECT>
</P>
<P>Language:
<SELECT id="reco-language" width="100%" SINGLE>
<OPTION selected="selected" value="en_us">US English</OPTION>
<OPTION value="es_es">Spanish</OPTION>
<OPTION value="fr_fr">French</OPTION>
<OPTION value="de_de">German</OPTION>
</SELECT>
</P>
<input id="recognize" onclick="startRecognition()" type="button" value="Start Recognition" style="width: 95%; font-size: 12px; font-face: helvetica; color: #4B714B; font-weight: bold" />
<!-- <input disabled=true id="stop-reco" onclick="stopRecognition()" type="button" value="Stop Reco" /> -->
<input id="get-result" onclick="getResult()" type="button" value="Get Last Result" style="width: 95%; font-size: 12px; font-face: helvetica; color: #4B714B; font-weight: bold" />
</div>
<div class="tab-data">
<p>TTS Text:<input id="tts-text" type="text" value="" /></p>
<P>Language:
<SELECT id="tts-language" width="100%" SINGLE>
<OPTION selected="selected" value="en_us">US English</OPTION>
<OPTION value="es_es">Spanish</OPTION>
<OPTION value="fr_fr">French</OPTION>
<OPTION value="de_de">German</OPTION>
</SELECT>
</P>
<input id="play-tts" onclick="playTTS()" type="button" value="Play TTS" style="width: 95%; font-size: 12px; font-face: helvetica; color: #4B714B; font-weight: bold" />
<!-- <input disabled=true id="stop-tts" onclick="stopTTS()" type="button" value="Stop TTS" /> -->
</div>
</div>
</div>
<!-- Place Holder for placing the result -->
<div id="result"></div>
<div id="reco-dialog">
<div id="reco-dialog-main">
<p>Listening...</p>
<HR>
<div id="volume-level"></div>
<HR>
<input disabled=true id="stop-reco" onclick="stopRecognition()" type="button" value="Stop Recognition" style="width: 90%; font-size: 12px; font-face: helvetica; color: #4B714B; font-weight: bold" />
</div>
</div>
<div id="tts-dialog">
<div id="tts-dialog-main">
<p>Playing...</p>
<HR>
<input disabled=true id="stop-tts" onclick="stopTTS()" type="button" value="Stop TTS" style="width: 90%; font-size: 12px; font-face: helvetica; color: #4B714B; font-weight: bold" />
</div>
</div>
<script type="text/javascript" src="js/cordova-2.6.0.js"></script>
<script type="text/javascript" src="js/nuancespeechkit.js"></script>
<script type="text/javascript" src="js/sample.js"></script>
<script type="text/javascript" >
setActiveTab(1);
document.addEventListener('deviceready', function() {
//var initButton = document.getElementById("init-speech");
//var cleanUpButton = document.getElementById("cleanup");
doInit();
document.addEventListener('backbutton', function() { doCleanup(); navigator.app.exitApp(); }, true);
//initButton.disabled=true;
//cleanUpButton.disabled=false;
}, true);
</script>
</body>
</html>