Skip to content

Commit 013e60e

Browse files
committed
fixed url promise example
1 parent 4074471 commit 013e60e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ <h3>Microphone Input</h3>
1818
<ul>
1919
<li><a href="microphone-streaming.html">Transcribe from Microphone</a></li>
2020
<li><a href="microphone-streaming-auto-stop.html">Transcribe from Microphone, automatically stop at first pause</a></li>
21+
<li><a href="microphone-streaming-model.html">Transcribe from Microphone, with chosen model</a></li>
2122
<li><a href="microphone-alternatives.html">Transcribe from Microphone, with Alternatives</a></li>
2223
<li><a href="microphone-word-confidence.html">Transcribe from Microphone, with Word Confidence</a></li>
2324
<li><a href="microphone-streaming-text-to-console.html">Transcribe from Microphone, send text to console</a></li>
24-
<li><a href="microphone-streaming-model.html">Transcribe from Microphone, Streaming with chosen model</a></li>
2525
<li><a href="microphone-streaming-object-to-console.html">Transcribe from Microphone, send JSON to console (includes text and metadata; v0.22+ format)</a></li>
2626
<li><a href="browserify.html">Browserify example</a></li>
2727
<li><a href="webpack.html">Webpack example</a></li>

examples/static/url-promise.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<section>
1414
<h1>Transcribe URL, return a promise with content</h1>
15-
<button id="button">Play and Transcribe</button>
15+
<button id="button">git stTranscribe</button>
1616

1717
<h2>Output:</h2>
1818
<div id="output">--</div>
@@ -35,13 +35,13 @@ <h2>Code for this demo:</h2>
3535

3636
return WatsonSpeech.SpeechToText.recognizeFile({
3737
token: token,
38-
file: '/Us_English_Broadband_Sample_1.wav',
39-
outputElement: output
38+
file: '/Us_English_Broadband_Sample_1.wav'
4039
})
41-
.promise()
42-
.then(function(text) {
43-
output.textContent = text;
44-
});
40+
.promise();
41+
})
42+
.then(function(text) {
43+
console.log('done', text);
44+
output.textContent = text;
4545
})
4646
.catch(function(err) {
4747
console.log(err);

0 commit comments

Comments
 (0)