-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kitipong
committed
Apr 27, 2017
1 parent
a3d5556
commit 5ac9132
Showing
14 changed files
with
1,915 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright (c) 2014, Kaarel Kaljurand | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, this | ||
list of conditions and the following disclaimer in the documentation and/or | ||
other materials provided with the distribution. | ||
|
||
* Neither the name of the {organization} nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,48 @@ | ||
# asr | ||
dictate.js | ||
========== | ||
|
||
__dictate.js__ is a small Javascript library for browser-based real-time speech recognition. | ||
It uses [Recorderjs](https://github.com/mattdiamond/Recorderjs) for audio capture, | ||
and a WebSocket connection to the | ||
[Kaldi GStreamer server](https://github.com/alumae/kaldi-gstreamer-server) for speech recognition. | ||
|
||
API | ||
--- | ||
|
||
The API is modeled after [Android's SpeechRecognizer](http://developer.android.com/reference/android/speech/SpeechRecognizer.html). | ||
See the source code of [lib/dictate.js](lib/dictate.js) and | ||
the usage in [demos/demo.js](demos/demo.js). | ||
|
||
Running the demos | ||
----------------- | ||
|
||
The demos connect to the public services running on `wss://bark.phon.ioc.ee` | ||
that offer Estonian and English speech recognition. | ||
|
||
The demos are available [here](https://kaljurand.github.io/dictate.js/). | ||
(Note that in order to use a wss-service the HTML-pages must be loaded over https.) | ||
|
||
To run the demos on localhost, start a local HTTP server, e.g.: | ||
|
||
python -m SimpleHTTPServer | ||
|
||
and then open e.g. <http://localhost:8000/demos/mob.html>. | ||
|
||
Browser support | ||
--------------- | ||
|
||
Known to work in: | ||
|
||
- Google Chrome 54.0 on Ubuntu 16.04 | ||
- Firefox 49.0.2 on Ubuntu 16.04 | ||
- Firefox 49.0.2 on Android 7.1.1 | ||
|
||
Known NOT to work in: | ||
|
||
- Google Chrome 54.0 on Android 7.1.1 | ||
|
||
See also | ||
-------- | ||
|
||
- [Dikteeri](https://bark.phon.ioc.ee/dikteeri/) is an Estonian dictation demo by the [Laboratory of Phonetics and Speech Technology](https://phon.ioc.ee/dokuwiki/doku.php?id=start.en) (in Estonian). Uses `dictate.js`. | ||
- [Kõnele](https://github.com/Kaljurand/K6nele) contains an Android front-end to the Kaldi GStreamer server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.controls { | ||
display: block; | ||
margin-top: .5em; | ||
margin-bottom: .5em; | ||
padding: 0; | ||
} | ||
#log { | ||
font-size: 80% | ||
} | ||
#statusBar { | ||
font-family: monospace; | ||
color: #9F000F; | ||
margin-top: 1em; | ||
margin-bottom: 1em; | ||
padding: 0; | ||
} | ||
#serverStatusBar { | ||
position: fixed; | ||
bottom: 0.4em; | ||
right: 0.4em; | ||
top: auto; | ||
left: auto; | ||
font-family: monospace; | ||
padding: 0.2em 0.2em 0.2em 0.2em; | ||
} | ||
.highlight { | ||
color: red; | ||
} | ||
ins { | ||
background-color: #c6ffc6; | ||
text-decoration: none; | ||
} | ||
|
||
del { | ||
background-color: #ffc6c6; | ||
} | ||
.diff { | ||
font-family: monospace; | ||
} | ||
|
||
|
||
.buttonsContainer { | ||
display: table; | ||
position: fixed; | ||
bottom: 0%; | ||
left: 0%; | ||
width: 100%; | ||
height: 10%; | ||
text-align: center; | ||
background-color: rgba(128,128,200,0.7); | ||
} | ||
|
||
.buttons { | ||
display: table-cell; | ||
vertical-align: middle; | ||
padding: 0.5em; | ||
} | ||
|
||
button { | ||
width: 7em; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<title>ASR project</title> | ||
|
||
<!-- Latest compiled and minified CSS --> | ||
<link rel="stylesheet" type="text/css" href="./css/semantic.min.css"> | ||
|
||
<link rel="stylesheet" type="text/css" href="./css/demo.css"> | ||
</head> | ||
|
||
<body> | ||
|
||
<div class="ui container"> | ||
|
||
<span id="serverStatusBar" title="Number of available workers"></span> | ||
|
||
<textarea id="trans" rows="5" style="width:100%; margin-top:.5em"> | ||
</textarea> | ||
|
||
<select id="servers" name="servers" style="margin-top:.5em"> | ||
<option value="wss://bark.phon.ioc.ee:8443/english/duplex-speech-api/ws/speech|wss://bark.phon.ioc.ee:8443/english/duplex-speech-api/ws/status" selected="selected">English</option> | ||
</select> | ||
|
||
<hr/> | ||
<center> | ||
<div> | ||
<button | ||
class="positive ui button" | ||
id="buttonToggleListening" | ||
onclick="toggleListening();">Start</button> | ||
<button | ||
class="negative ui button" | ||
id="buttonCancel" | ||
disabled="disabled" | ||
onclick="cancel();">Cancel</button> | ||
<button | ||
class="ui button" | ||
onclick="clearTranscription();">Clear</button> | ||
</div> | ||
</center> | ||
|
||
<hr/> | ||
|
||
<pre id="log"> | ||
</pre> | ||
|
||
</div> | ||
|
||
</body> | ||
|
||
<script src="./javascripts/jquery-3.2.1.min.js"></script> | ||
<script src="./javascripts/semantic.min.js"></script> | ||
|
||
<script src="./lib/dictate.js"></script> | ||
<script src="./lib/recorder.js"></script> | ||
<script src="./javascripts/mob.js"></script> | ||
|
||
</html> |
Oops, something went wrong.