Skip to content

Conversation

@xcv58
Copy link

@xcv58 xcv58 commented Dec 13, 2025

Add ability to download srt and txt, screenshots:

image image

Sample files:
result_20251212_233406.txt

result_20251212_233406.srt.txt (the .txt is manually added since GitHub doesn't allow .srt file)

@gemini-code-assist
Copy link

Summary of Changes

Hello @xcv58, 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!

This pull request significantly enhances the user experience by introducing the ability to download the generated transcription results. Users can now easily obtain both the plain text recognition output and the SRT subtitle file directly from the application's interface, streamlining the workflow for accessing and utilizing the processed content.

Highlights

  • New File Saving Utility: A new utility function, save_text_to_file, has been introduced to handle the saving of text content (like transcription results) to files with a timestamped filename, either in a specified output directory or a temporary location.
  • Integration with Recognition Functions: The mix_recog and mix_recog_speaker functions have been updated to utilize the new save_text_to_file utility, ensuring that both plain text and SRT subtitle content are saved to files after processing.
  • Gradio UI Enhancements: Two new gr.File components have been added to the Gradio interface, providing users with direct download links for the generated .txt (recognition result) and .srt (subtitle) files.
  • Updated Event Handlers: The Gradio event handlers for the recognition buttons (recog_button and recog_button2) have been modified to return the paths of the newly saved text and SRT files, populating the new download components in the UI.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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

The pull request introduces a new save_text_to_file utility function to automatically save recognition results (text and SRT) with timestamps, either to a specified output directory or a temporary location, and integrates this into the Gradio UI to provide downloadable links for these files. A review comment suggests improving the save_text_to_file function by creating the output_dir if it's specified but doesn't exist, rather than silently falling back to a temporary directory, to ensure more robust behavior consistent with other parts of the codebase.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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