Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to add the speech recognition feature using Javascript #190

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ SymPy Online Shell
:target: https://travis-ci.org/sympy/sympy-live

Online Shell for SymPy (sympy-live) is a simple web application based on
Google App Engine, which allows to evaluate Python code with SymPy in web
Google App Engine(GAE), which allows to evaluate Python code with SymPy in web
browsers.

This is accomplished by providing a HTML/JavaScript GUI for entering source
code and visualization of output, and a server part which evaluates the
requested source code. Note that this shell is not scalable and it uses
only one instance on GAE, thus all evaluation requests are queued and it
only one instance on GAE,thus all evaluation requests are queued and it
may take quite a lot of time, before our code can be evaluated (depending
on the current load of the instance).

Expand Down
12 changes: 12 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,24 @@

gtag('config', 'UA-163910085-2');
</script>
<script>
function record(){
var record=new webkitSpeechRecognition();
recognition.lang="en-GB";
recognition.onresult=function(event){
console.log(event);

}
recognition.start();
}
</script>
</head>
<body>
<div class="container">
<header>
<h1><a href="/"> <img src="/static-{{application_version}}/images/logo.png" alt="SymPy Logo" /> SymPy</a></h1>
<label for="Speech Recognition">Speech Recognition</label>
<input type="text" name="" id="speechTotext" placeholder="Speech Something" onclick=record()>
<div id="mobile-menu"><i class="icon-ellipsis-vertical"></i></div>
</header>
<nav id="main-navigation" class="row">
Expand Down
2 changes: 1 addition & 1 deletion templates/shell.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>SymPy Live</h1>
<h3>{{ user.nickname }}</h3>
</div>
{% else %}
<h3><a href="{{ login_url }}">Log In</a></h3>

{% endif %}
<div class="content">
{% if user %}
Expand Down