Skip to content

Commit 61c139f

Browse files
localai-botteam-coding-agent-1
andauthored
feat: Rename 'Whisper' model type to 'STT' in UI (#8785)
* feat: Rename 'Whisper' model type to 'STT' in UI - Updated models.html: Changed 'Whisper' filter button to 'STT' - Updated talk.html: Changed 'Whisper Model' to 'STT Model' - Updated backends.html: Changed 'Whisper' to 'STT' - Updated talk.js: Renamed getWhisperModel() to getSTTModel(), sendAudioToWhisper() to sendAudioToSTT(), and whisperModelSelect to sttModelSelect This change makes the UI more consistent with the model category naming, where all speech-to-text models (including Whisper, Parakeet, Moonshine, WhisperX, etc.) are grouped under the 'STT' (Speech-to-Text) category. Fixes #8776 Signed-off-by: team-coding-agent-1 <team-coding-agent-1@localai.dev> * Rename whisperModelSelect to sttModelSelect in talk.html As requested by maintainer mudler in PR review, replacing all whisperModelSelect occurrences with sttModelSelect since the model type was renamed from Whisper to STT. Signed-off-by: LocalAI [bot] <localai-bot@users.noreply.github.com> --------- Signed-off-by: team-coding-agent-1 <team-coding-agent-1@localai.dev> Signed-off-by: LocalAI [bot] <localai-bot@users.noreply.github.com> Co-authored-by: team-coding-agent-1 <team-coding-agent-1@localai.dev> Co-authored-by: LocalAI [bot] <localai-bot@users.noreply.github.com>
1 parent 9fc7790 commit 61c139f

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

core/http/static/talk.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ function getModel() {
1313
return document.getElementById('modelSelect').value;
1414
}
1515

16-
function getWhisperModel() {
17-
return document.getElementById('whisperModelSelect').value;
16+
function getSTTModel() {
17+
return document.getElementById('sttModelSelect').value;
1818
}
1919

2020
function getTTSModel() {
@@ -73,7 +73,7 @@ function stopRecording() {
7373
document.getElementById("loader").style.display = "block";
7474
const audioBlob = new Blob(audioChunks, { type: 'audio/webm' });
7575
document.getElementById("statustext").textContent = "Processing audio...";
76-
const transcript = await sendAudioToWhisper(audioBlob);
76+
const transcript = await sendAudioToSTT(audioBlob);
7777
console.log("Transcript:", transcript);
7878
document.getElementById("statustext").textContent = "Seems you said: " + transcript+ ". Generating response...";
7979
const responseText = await sendTextToChatGPT(transcript);
@@ -95,18 +95,18 @@ function stopRecording() {
9595
};
9696
}
9797

98-
async function sendAudioToWhisper(audioBlob) {
98+
async function sendAudioToSTT(audioBlob) {
9999
const formData = new FormData();
100100
formData.append('file', audioBlob);
101-
formData.append('model', getWhisperModel());
101+
formData.append('model', getSTTModel());
102102

103103
const response = await fetch('v1/audio/transcriptions', {
104104
method: 'POST',
105105
body: formData
106106
});
107107

108108
const result = await response.json();
109-
console.log("Whisper result:", result)
109+
console.log("STT result:", result)
110110
return result.text;
111111
}
112112

core/http/views/backends.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ <h3 class="text-lg font-semibold text-[var(--color-text-primary)] mb-4 flex item
186186
<button @click="filterByTerm('whisper')"
187187
class="flex items-center justify-center rounded-lg px-4 py-3 text-sm font-semibold bg-[var(--color-success-light)] hover:bg-[var(--color-success)]/30 text-[var(--color-success)] border border-[var(--color-success)]/30 transition-colors">
188188
<i class="fas fa-headphones mr-2"></i>
189-
<span>Whisper</span>
189+
<span>STT</span>
190190
</button>
191191
<button @click="filterByTerm('object-detection')"
192192
class="flex items-center justify-center rounded-lg px-4 py-3 text-sm font-semibold bg-[var(--color-error-light)] hover:bg-[var(--color-error)]/30 text-[var(--color-error)] border border-[var(--color-error)]/30 transition-colors">

core/http/views/models.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ <h3 class="text-lg font-semibold text-[var(--color-text-primary)] mb-4 flex item
142142
<i class="fas fa-sort-amount-up mr-2"></i>
143143
<span>Rerank</span>
144144
</button>
145-
<button @click="filterByTerm('whisper')"
145+
<button @click="filterByTerm('stt')"
146146
class="flex items-center justify-center rounded-lg px-4 py-3 text-sm font-semibold bg-[var(--color-bg-secondary)] hover:bg-[var(--color-secondary-light)] text-[var(--color-text-primary)] border border-[var(--color-border-subtle)] hover:border-[var(--color-secondary-light)] transition-colors">
147147
<i class="fas fa-headphones mr-2"></i>
148-
<span>Whisper</span>
148+
<span>STT</span>
149149
</button>
150150
<button @click="filterByTerm('object-detection')"
151151
class="flex items-center justify-center rounded-lg px-4 py-3 text-sm font-semibold bg-red-600/20 hover:bg-red-600/30 text-red-300 border border-red-500/30 transition-colors">

core/http/views/talk.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ <h1 class="hero-title">
6565
</select>
6666
</div>
6767

68-
<!-- Whisper Model -->
68+
<!-- STT Model -->
6969
<div class="space-y-2">
70-
<label for="whisperModelSelect" class="flex items-center text-[var(--color-text-secondary)] font-medium">
71-
<i class="fas fa-ear-listen text-[var(--color-accent)] mr-2"></i>Whisper Model
70+
<label for="sttModelSelect" class="flex items-center text-[var(--color-text-secondary)] font-medium">
71+
<i class="fas fa-ear-listen text-[var(--color-accent)] mr-2"></i>STT Model
7272
</label>
73-
<select id="whisperModelSelect"
73+
<select id="sttModelSelect"
7474
class="w-full bg-[var(--color-bg-primary)] text-[var(--color-text-primary)] border border-[var(--color-border-subtle)] focus:border-[var(--color-accent)] focus:ring-2 focus:ring-[var(--color-accent)]/50 rounded-lg shadow-sm p-2.5 appearance-none">
7575
<option value="" disabled class="text-[var(--color-text-secondary)]">Select a model</option>
7676
{{ range .ModelsConfig }}

0 commit comments

Comments
 (0)