Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Web UI Issue? Or fix #216

Open
httpproxx opened this issue Mar 2, 2020 · 0 comments
Open

Web UI Issue? Or fix #216

httpproxx opened this issue Mar 2, 2020 · 0 comments

Comments

@httpproxx
Copy link

httpproxx commented Mar 2, 2020

I'm submitting a:

  • [ ?] Bug report
  • [? ] Feature request

How could i get this onclick to be listening the whole time That way i dont need to click

         <div id="imgGalCont" onclick="speechHandler()">
        
        <div id="imgGalIn">

        </div>
		<div id="imgGalMid">

        </div>
        <div id="imgGalOut"></div>

    </div>
    <div class="footerImg">
        <div class="semText"></div>
        <div class="juryText"></div>
    </div>
    <div class="footerGraph">
        <div class="footerGraphUnit"></div>
        <div class="footerGraphUnit"></div>
        <div class="footerGraphUnit"></div>
        <div class="footerGraphUnit"></div>
        <div class="footerGraphUnit"></div>
        <div class="footerGraphUnit"></div>
        <div class="footerGraphUnit"></div>
    </div>
</div>
<script type="text/javascript" src="{{ url_for('static', filename = 'js/socket.io.min.js') }}"></script> <script> var socket = io.connect('http://' + document.domain + ':' + location.port); function speechHandler(){ var recognition = new (webkitSpeechRecognition)(); recognition.lang = 'en-US'; recognition.interimResults = false; recognition.maxAlternatives = 5; recognition.start(); recognition.onresult = function(event) { $('#imgGalIn').airport([event.results[0][0].transcript]); recognition.stop(); socket.emit('user speaks', {data: event.results[0][0].transcript}); }; } socket.on('melissa replies', function(test) { $('#imgGalMid').airport([test]); }); </script>
   <script type="text/javascript" src="{{ url_for('static', filename = 'js/jquery-2.1.0.min.js') }}"> 
   </script>
    <script type="text/javascript" src="{{ url_for('static', filename = 'js/all.js') }}"></script>
     <script type="text/javascript" src="{{ url_for('static', filename = 'js/transit.min.js') }}"> 
     </script>
   <script type="text/javascript" src="{{ url_for('static', filename = 'js/jquery.airport-1.1.source.js') 
   }}"></script>
  <script type="text/javascript" src="{{ url_for('static', filename = 'js/jquery.airport- 
   1.1x.source.js') }}"></script>
    </html>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant