fixed voice recording and transcription

This commit is contained in:
Saifeddine ALOUI 2024-09-12 22:23:24 +02:00
parent e01907721b
commit 70a3d081c3
4 changed files with 8 additions and 4 deletions

View File

@ -507,7 +507,9 @@ def stop_recording(data:Identification):
lollmsElfServer.info("Stopping audio capture")
fn = lollmsElfServer.audioNinja.stop_recording()
lollmsElfServer.audioNinja = None
if lollmsElfServer.stt:
if lollmsElfServer.stt and fn:
text = lollmsElfServer.stt.transcribe(fn)
return text
else:
return ""

File diff suppressed because one or more lines are too long

2
web/dist/index.html vendored
View File

@ -6,7 +6,7 @@
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LoLLMS WebUI</title>
<script type="module" crossorigin src="/assets/index-1f8c86f3.js"></script>
<script type="module" crossorigin src="/assets/index-1a16f704.js"></script>
<link rel="stylesheet" href="/assets/index-a6119f57.css">
</head>
<body>

View File

@ -1001,7 +1001,9 @@ export default {
this.is_recording = false;
this.pending = false;
console.log(response)
this.text += response.data.text
this.text += response.data
console.log("text")
console.log(this.text)
console.log(response.data)
this.presets=response.data