Skip to content

Chat component - speech to text#1893

Open
ivanvpetrov wants to merge 18 commits into
masterfrom
ipetrov/chat-speech-to-text
Open

Chat component - speech to text#1893
ivanvpetrov wants to merge 18 commits into
masterfrom
ipetrov/chat-speech-to-text

Conversation

@ivanvpetrov

Copy link
Copy Markdown

Add a speech to text functionality to the chat component.

The actual transcription is done by one of two options:

  1. (entirely on frontend) Webspeech API
    https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API
  2. (on complimentary backend) Backend handling the communication to a 3rd party provider : Google Speech/Vertex AI/etc
    https://github.com/IgniteUI/igniteui-speech-to-text-server

@ivanvpetrov ivanvpetrov added 🆕 status: new The issue is new and will be reviewed when somebody picks it up. chat labels Oct 15, 2025
@kdinev

kdinev commented Jun 8, 2026

Copy link
Copy Markdown
Member

@ivanvpetrov Please resolve the conflicts on this PR, because I want to revive it.
@rkaraivanov Let's try to get this finished, because it's been sitting for a while.

@ivanvpetrov ivanvpetrov self-assigned this Jun 9, 2026
Copilot AI review requested due to automatic review settings June 10, 2026 08:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds speech-to-text (STT) support to the igc-chat input area, with two transcription backends (Web Speech API or a SignalR-based companion server), plus new styling hooks and Storybook configuration to demonstrate the feature.

Changes:

  • Extends chat options/renderers with speechToText configuration and a speechToTextButton renderer, plus speakPlaceholder.
  • Implements STT clients for Web Speech and backend (SignalR + MediaRecorder), and wires STT UI into igc-chat-input (mic/stop button + countdown ring).
  • Updates styling, exported CSS parts, Storybook story configuration, and adds the SignalR dependency.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 19 comments.

Show a summary per file
File Description
stories/chat.stories.ts Demonstrates new STT options (speakPlaceholder, speechToText) and updates template story copy/button.
src/components/chat/types.ts Adds speakPlaceholder, speechToText options type, and speechToTextButton renderer type.
src/components/chat/themes/input.base.scss Adds STT UI animation/countdown styles.
src/components/chat/extras/stt-client-base.ts Introduces a base STT client with silence timeout + countdown signaling.
src/components/chat/extras/stt-client-webspeech.ts Implements Web Speech API STT client.
src/components/chat/extras/stt-client-backend.ts Implements SignalR + MediaRecorder STT client for the companion server.
src/components/chat/chat.ts Exposes additional forwarded parts for STT container/button.
src/components/chat/chat-input.ts Renders/controls the STT button, placeholder switching, and transcript injection into input state.
package.json Adds @microsoft/signalr dependency.
package-lock.json Lockfile updates reflecting the new dependency.

Comment thread src/components/chat/chat-input.ts Outdated
Comment thread src/components/chat/chat-input.ts
Comment thread src/components/chat/chat-input.ts
Comment thread src/components/chat/chat-input.ts Outdated
Comment thread src/components/chat/chat-input.ts Outdated
Comment thread src/components/chat/extras/stt-client-backend.ts
Comment thread src/components/chat/extras/stt-client-backend.ts
Comment thread package.json
Comment thread src/components/chat/extras/stt-client-webspeech.ts
Comment thread src/components/chat/extras/stt-client-webspeech.ts
ivanvpetrov and others added 3 commits June 10, 2026 11:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread src/components/chat/chat-input.ts Fixed
@ivanvpetrov

Copy link
Copy Markdown
Author

The PR was merged with master. All conflicts fixed.
Parts of the code was refactored after extensive copilot review.
Tests added for coverage.

@rkaraivanov The PR is ready for further review and functionality introduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chat 🆕 status: new The issue is new and will be reviewed when somebody picks it up.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants