JPLTedCas commited on
Commit
01b6601
1 Parent(s): e8e90a7

Update templates/escuchar_admision1.html

Browse files
Files changed (1) hide show
  1. templates/escuchar_admision1.html +65 -53
templates/escuchar_admision1.html CHANGED
@@ -9,52 +9,64 @@
9
  <body>
10
  <div class="login22">
11
  <h2 style="font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;font-size: 3rem;background-color: gray;"><img src="{{ user_image7 }}" alt="" style="max-width:5%;" onclick="location.href='/especialidad'"> Admisión: </h2>
12
- <h3 style="padding-left: 80%;font-size: 1.2rem;" onclick="location.href='/ajustes'">AJUSTES <img src="{{ user_image6 }}" alt="" style="max-width:18%;" ></h3>
13
- <hr/>
14
  <h2 style="font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman';font-size: 1.7rem;">Asistente de voz:</h2>
15
- <form action="{{url_for('escuchar_admision1')}}" method="post">
16
- <button type="button" id="startRecording" style="padding-right: 85%;font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman';font-size: 1.2rem;padding-left: 1%;background-color: white; border: solid white" onclick="location.href='/escuchar_admision'">Escuchar: <img src="{{ user_image5 }}" width="60% " style=" border-radius: 100%;box-shadow:2px 2px 2px 1px rgba(0, 0, 0, 0.2);" onclick="location.href='/escuchar_admision'"></button>
17
- <div id="output"></div>
18
-
19
- <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js"></script>
20
- <script>
21
- const socket = io.connect('https://' + document.domain + ':' + location.port, { secure: true });
22
- const startRecordingButton = document.getElementById('startRecording');
23
- const outputDiv = document.getElementById('output');
24
- let mediaRecorder;
25
- let audioChunks = [];
26
- let recognition;
27
-
28
- startRecordingButton.addEventListener('click', () => {
29
- if (!recognition) {
30
- recognition = new webkitSpeechRecognition();
31
- recognition.lang = 'es-ES';
32
- recognition.onresult = function (event) {
33
- const result = event.results[0][0].transcript;
34
- socket.emit('audio_data', result);
35
- };
36
-
37
- }
38
- try {
39
- recognition.start();
40
- } catch (error) {
41
- console.error('Error al iniciar el reconocimiento de voz: ', error);
42
- }
43
- });
44
- socket.on('transcription', function (data) {
45
- outputDiv.innerHTML = 'Texto reconocido: ${data}';
46
- });
47
- </script>
48
-
49
-
50
-
51
- </form>
52
-
53
-
54
- <br>
55
- <br>
56
-
57
- <b style="font-size: 1.4rem;font-family: Arial, Helvetica, sans-serif;">{{prediction_text}}</b>
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  <br>
60
  <br>
@@ -62,16 +74,16 @@
62
  <br>
63
  <br>
64
  <img src="{{ user_image8 }}" style="max-width:30%;" onclick="location.href='/mapa_camas'">
65
- <img src="{{ user_image9 }}" style="max-width:30%;" onclick="location.href='/ambulancias'" >
66
-
67
-
68
  <br>
69
  <img src="{{ user_image10 }}" style="max-width:30%;" onclick="location.href='/programacion_quirurgica'">
70
- <img src="{{ user_image11 }}" style="max-width:30%;" onclick="location.href='/otros'" >
71
-
72
-
73
-
74
-
75
  </div>
76
  </body>
77
  </html>
 
9
  <body>
10
  <div class="login22">
11
  <h2 style="font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;font-size: 3rem;background-color: gray;"><img src="{{ user_image7 }}" alt="" style="max-width:5%;" onclick="location.href='/especialidad'"> Admisión: </h2>
12
+ <h3 style="padding-left: 80%;font-size: 1.2rem;" onclick="location.href='/ajustes'">AJUSTES <img src="{{ user_image6 }}" alt="" style="max-width:18%;"></h3>
13
+ <hr />
14
  <h2 style="font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman';font-size: 1.7rem;">Asistente de voz:</h2>
15
+ <form action="{{url_for('escuchar_admision1')}}" method="post">
16
+ <button type="button" style="padding-right: 85%;font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman';font-size: 1.2rem;padding-left: 1%;background-color: white; border: solid white" onclick="location.href='/escuchar_admision'">Escuchar: <img src="{{ user_image5 }}" width="30% " style=" border-radius: 100%;box-shadow:2px 2px 2px 1px rgba(0, 0, 0, 0.2);" onclick="location.href='http://127.0.0.1:5000/escuchar_admision'"></button>
17
+
18
+
19
+
20
+
21
+ </form>
22
+
23
+
24
+
25
+
26
+ <!---------------------------------------------------------------------------------------->
27
+
28
+ <div id="controls">
29
+ <button id="recordButton">Grabar Voz</button>
30
+ <!--<button id="pauseButton" disabled>Pause</button>-->
31
+ <button id="stopButton" disabled>Parar grabacion y buscar</button>
32
+ </div>
33
+ <div id="formats">Dele al botón "Grabar Voz". Cuando acabe, dele al botón "Parar grabación..." y obtendrá el resultado de la búsqueda</div>
34
+ <p><strong>Grabación:</strong></p>
35
+ <ol id="recordingsList"></ol>
36
+
37
+
38
+
39
+
40
+
41
+ <!-- inserting these scripts at the end to be able to use all the elements in the DOM -->
42
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
43
+ <script src="https://cdn.rawgit.com/mattdiamond/Recorderjs/08e7abd9/dist/recorder.js"></script>
44
+ <script src="/static/js/appadmision.js"></script>
45
+ <!-- Agrega un cuadro de texto para mostrar la respuesta -->
46
+ <!--<input type="text" id="responseTextBox" readonly>-->
47
+ <!--<div id="textElement">-->
48
+ <!-- El texto plano se mostrará aquí -->
49
+ <!--</div>-->
50
+ <!--<h1>Grabación de Audio</h1>
51
+
52
+
53
+
54
+
55
+
56
+ <br>
57
+ <br>
58
+
59
+ <!--<b style="font-size: 1.4rem;font-family: Arial, Helvetica, sans-serif;">{{prediction_text}}</b>-->
60
+
61
+ <br>
62
+ <br>
63
+ <!---------------------------------------------------------------------------------------->
64
+
65
+
66
+ <br>
67
+ <br>
68
+
69
+ <b style="font-size: 1.4rem;font-family: Arial, Helvetica, sans-serif;">{{prediction_text}}</b>
70
 
71
  <br>
72
  <br>
 
74
  <br>
75
  <br>
76
  <img src="{{ user_image8 }}" style="max-width:30%;" onclick="location.href='/mapa_camas'">
77
+ <img src="{{ user_image9 }}" style="max-width:30%;" onclick="location.href='/ambulancias'">
78
+
79
+
80
  <br>
81
  <img src="{{ user_image10 }}" style="max-width:30%;" onclick="location.href='/programacion_quirurgica'">
82
+ <img src="{{ user_image11 }}" style="max-width:30%;" onclick="location.href='/otros'">
83
+
84
+
85
+
86
+
87
  </div>
88
  </body>
89
  </html>