Skip to content

Voice input feature added. #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JHarrysP
Copy link

@JHarrysP JHarrysP commented Aug 5, 2025

Voice input added.
mic-test

Copy link

google-cla bot commented Aug 5, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @JHarrysP, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've implemented a new voice input feature for the frontend, allowing users to dictate text directly into the input form. This involved creating a dedicated VoiceInput component that utilizes the Web Speech API and integrating it seamlessly into the existing InputForm. Alongside this, I've made minor usability improvements to the input form's keyboard shortcuts and updated several development dependencies to ensure a robust and modern development environment.

Highlights

  • Introduction of Voice Input: I've introduced a new VoiceInput component that leverages the browser's Web Speech API to provide speech-to-text functionality. This component handles microphone access, recording states, and transcribes spoken words into text.
  • Enhanced Input Experience: The InputForm component has been enhanced to integrate the new voice input feature. Users can now click a microphone icon to dictate their input. Additionally, I've refined the text input experience by changing the default submission key from Ctrl+Enter to a simpler Enter key press, making the form more intuitive to use.
  • Dynamic Transcription Handling: The system now intelligently handles voice transcriptions. When a user speaks, the transcribed text is appended to the existing input field. There's also an option for immediate auto-submission of the transcribed text, which streamlines the workflow for quick voice commands.
  • Dependency Maintenance: I've updated several development dependencies in package-lock.json, primarily related to ESLint and JavaScript parsing libraries. This ensures that our frontend development environment remains up-to-date, maintaining code quality and compatibility with the latest standards.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a voice input feature using the Web Speech API, which is a great addition. The new VoiceInput component is well-structured and handles various states and potential errors gracefully.

I've provided a few suggestions to improve the code quality:

  • Refactoring some logic in InputForm.tsx for better readability.
  • Removing debug console.log statements from both InputForm.tsx and VoiceInput.tsx.
  • Improving type safety in VoiceInput.tsx by replacing any with a more specific type for a React ref.

Overall, this is a solid implementation of the new feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant