Skip to content

Commit

Permalink
further tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Addy Osmani authored and Addy Osmani committed Jun 13, 2011
1 parent ca705c5 commit 3c0c99d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -31,7 +31,7 @@ <h1>Webkit Robot Demo</h1>
<form action="/" id="q">
<input name="speechQuery" id="speechQuery" type="text" x-webkit-speech speech error onwebkitspeechchange="speechBrowser.query(true);" />
<input type="submit" name="submitQuery" id="submitQuery" value="Submit" />
<h3>Supports: hello, how is the weather? (variations), what is your name?, search [something something], whats your favorite movie?, define [something]</h3>
<h3>Supports: hello, how is the weather? (variations), what is your name?, search [something something], whats your favorite movie?, define [something], french [something], german [something]</h3>
</form>
<div class="search-case">
<div id="search-results"></div>
Expand Down
4 changes: 1 addition & 3 deletions js/mylibs/speechBrowser.js
Expand Up @@ -87,7 +87,6 @@ var speechBrowser = function(){
this.getDictionaryDefinition(src);
break;
}

},

getQueryStartsWith: function(needle, haystack){
Expand All @@ -113,7 +112,7 @@ var speechBrowser = function(){

query: function(val){
//set qStr = val if you want to test without speaking.
var qStr = speech.val();
var qStr = speech.val() || val;
var stage = $('#search-results');

this.prepareStage();
Expand All @@ -126,7 +125,6 @@ var speechBrowser = function(){
frenchTest = $.trim(this.getQueryStartsWith('french', qStr)),
germanTest = $.trim(this.getQueryStartsWith('german', qStr));

console.log('def test:' + defineTest);

if(searchTest.length > 0){
this.textToSpeech('i hope these results for' + searchTest + ' help ');
Expand Down

0 comments on commit 3c0c99d

Please sign in to comment.