You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>For more information about the Speech To Text service, read the <ahref="https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/speech-to-text.html">documentation</a>.</p>
89
89
</script>
@@ -92,81 +92,82 @@
92
92
93
93
// Need to simulate a namespace, as some of the variables had started to leak across nodes
94
94
functionSTT(){
95
-
varmodels=null;
96
-
varLANGUAGES=null;
97
-
varlanguages=null;
98
-
varbands=null;
99
-
varlanguage_selected='';
100
-
varband_selected='';
101
-
}
102
-
103
-
// This is the namespace for stt. Currently only contains models, but more vars and functions may need to be
95
+
}
96
+
97
+
98
+
// This is the namespace for stt. Currently only contains models, but more vars and functions may need to be
104
99
// moved in if there is a clash with other nodes.
105
100
varstt=newSTT();
106
-
107
-
stt.LANGUAGES={'en-US' : 'US English',
108
-
'pt-BR': 'Portuguese Braziilian',
109
-
'en-UK': 'UK English',
110
-
'zh-CN': 'Mandarin',
111
-
'es-ES': 'Spanish',
112
-
'ar-AR': 'Arablic',
101
+
stt.models=null;
102
+
stt.languages=null;
103
+
stt.bands=null;
104
+
stt.language_selected='';
105
+
stt.band_selected='';
106
+
107
+
stt.LANGUAGES={'en-US': 'US English',
108
+
'pt-BR': 'Portuguese Braziilian',
109
+
'en-UK': 'UK English',
110
+
'fr-FR': 'French',
111
+
'zh-CN': 'Mandarin',
112
+
'es-ES': 'Spanish',
113
+
'ar-AR': 'Arablic',
113
114
'ja-JP': 'Japanese'
114
115
};
115
116
116
117
// sorting functions
117
-
functiononlyUnique(value,index,self){
118
+
stt.onlyUnique=function(value,index,self){
118
119
returnself.indexOf(value)===index;
119
120
}
120
121
121
-
// Function to be used at the start, as don't want to expose any fields, unless the models are
122
-
// available. The models can only be fetched if the credentials are available.
123
-
functionhideEverything(){
122
+
// Function to be used at the start, as don't want to expose any fields, unless the models are
123
+
// available. The models can only be fetched if the credentials are available.
124
+
stt.hideEverything=function(){
124
125
if(!stt.models){
125
126
$('#credentials-not-found').show();
126
-
$('label#node-label-message').parent().hide();
127
-
$('input#node-input-continuous').parent().hide();
127
+
$('label#node-label-message').parent().hide();
128
+
$('input#node-input-continuous').parent().hide();
128
129
$('select#node-input-lang').parent().hide();
129
-
$('select#node-input-band').parent().hide();
130
-
}
130
+
$('select#node-input-band').parent().hide();
131
+
}
131
132
}
132
133
133
-
// Check if there is a model then can show the fields.
134
-
// available. The models can only be fetched if the credentials are available.
135
-
functionvisibilityCheck(){
134
+
// Check if there is a model then can show the fields.
135
+
// available. The models can only be fetched if the credentials are available.
136
+
stt.VisibilityCheck=function(){
136
137
if(stt.models){
137
-
$('label#node-label-message').parent().hide();
138
-
$('input#node-input-continuous').parent().show();
139
-
$('select#node-input-lang').parent().show();
140
-
$('select#node-input-band').parent().show();
138
+
$('label#node-label-message').parent().hide();
139
+
$('input#node-input-continuous').parent().show();
140
+
$('select#node-input-lang').parent().show();
141
+
$('select#node-input-band').parent().show();
141
142
}else{
142
-
$('label#node-label-message').parent().hide();
143
-
$('input#node-input-continuous').parent().hide();
144
-
$('select#node-input-lang').parent().hide();
145
-
$('select#node-input-band').parent().hide();
146
-
}
143
+
$('label#node-label-message').parent().hide();
144
+
$('input#node-input-continuous').parent().hide();
145
+
$('select#node-input-lang').parent().hide();
146
+
$('select#node-input-band').parent().hide();
147
+
}
147
148
}
148
149
149
150
150
151
// Simple check that is only invoked if the service is not bound into bluemix. In this case the
151
-
// user has to provide credentials. Once there are credentials, then the stt.models are retrieved.
152
-
functioncheckCredentials(){
152
+
// user has to provide credentials. Once there are credentials, then the stt.models are retrieved.
0 commit comments