Chat component - speech to text#1893
Conversation
|
@ivanvpetrov Please resolve the conflicts on this PR, because I want to revive it. |
There was a problem hiding this comment.
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
speechToTextconfiguration and aspeechToTextButtonrenderer, plusspeakPlaceholder. - 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. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
The PR was merged with master. All conflicts fixed. @rkaraivanov The PR is ready for further review and functionality introduction. |
Add a speech to text functionality to the chat component.
The actual transcription is done by one of two options:
https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API
https://github.com/IgniteUI/igniteui-speech-to-text-server