mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
SpeechToText js simplify error feedback to console.error
This commit is contained in:
parent
4379a74f9d
commit
641dc51699
1 changed files with 2 additions and 16 deletions
|
@ -96,7 +96,7 @@
|
||||||
|
|
||||||
// Setup button click handler
|
// Setup button click handler
|
||||||
button.addEventListener('click', function() {
|
button.addEventListener('click', function() {
|
||||||
led.style.backgroundColor = 'green';
|
led.style.backgroundColor = 'lime';
|
||||||
recognition.start();
|
recognition.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -106,22 +106,8 @@
|
||||||
|
|
||||||
// Try to populate the chat input directly
|
// Try to populate the chat input directly
|
||||||
const success = populateChatInput(transcript);
|
const success = populateChatInput(transcript);
|
||||||
|
if (!success)
|
||||||
if (!success) {
|
|
||||||
console.error('populateChatInput failed');
|
console.error('populateChatInput failed');
|
||||||
|
|
||||||
// Add a debug display with the transcribed text
|
|
||||||
const debugContainer = document.createElement('div');
|
|
||||||
debugContainer.style.padding = '10px';
|
|
||||||
debugContainer.style.marginTop = '10px';
|
|
||||||
debugContainer.style.backgroundColor = '#ffeeee';
|
|
||||||
debugContainer.style.border = '1px solid #ffcccc';
|
|
||||||
debugContainer.innerHTML = `
|
|
||||||
<div><strong>Debug: Transcribed text</strong></div>
|
|
||||||
<div><textarea style="width: 100%; height: 80px;">${transcript}</textarea></div>
|
|
||||||
`;
|
|
||||||
container.appendChild(debugContainer);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
recognition.onerror = function(event) {
|
recognition.onerror = function(event) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue