Skip to content

Conversation

@songguocola
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

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

此拉取请求主要增强了音频处理和语音合成功能,通过引入 max_prompt_audio_length 参数,允许用户更精细地控制 prompt audio 的长度,并新增了 HotFix 机制,为语音合成提供了灵活的发音和文本替换能力。此外,还对多模态对话中的 WebSocket 连接心跳机制进行了调整,以优化连接管理。

Highlights

  • 新增语音克隆参数: 在 dashscope/audio/tts_v2/enrollment.py 中,为 create_voice 函数新增了 max_prompt_audio_length 参数,用于控制音频预处理输出的 prompt audio 最长长度。
  • 引入语音合成热修复功能: 在 dashscope/audio/tts_v2/speech_synthesizer.py 中,引入了 HotFix 数据类,用于支持语音合成中的发音和文本替换热修复功能,并允许通过 SpeechSynthesizer 类的 hot_fix 参数进行配置。
  • 调整 WebSocket 心跳机制: 在 dashscope/multimodal/multimodal_dialog.py 中,禁用了 WebSocket 连接的 ping 机制,将 ping_intervalping_timeout 设置为 None,并移除了硬编码的 ping_interval 设置。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • dashscope/audio/tts_v2/enrollment.py
    • create_voice 函数新增 max_prompt_audio_length 参数及其文档说明。
    • create_voice 函数内部,如果提供了 max_prompt_audio_length,则将其添加到请求参数中。
  • dashscope/audio/tts_v2/speech_synthesizer.py
    • 新增 dataclass HotFix,用于封装发音和文本替换的热修复规则。
    • SpeechSynthesizer 类的 __init__ 方法新增 hot_fix 参数,并更新了其文档字符串。
    • __update_params 方法现在能够处理 HotFix 实例或字典形式的 hot_fix 参数,并将其合并到 additional_params 中。
    • 更新了 __init__ 方法的文档字符串,增加了 enable_markdown_filter 的说明。
  • dashscope/multimodal/multimodal_dialog.py
    • 修改 _run_forever 方法,将 self.ws.run_foreverping_intervalping_timeout 参数设置为 None,以禁用 WebSocket 心跳。
    • 移除了 _connect 方法中设置 self.ws.ping_interval = 3 的代码行。
Activity
  • 目前没有发现人工评论、审查或进展更新。
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 max_prompt_audio_length parameter for voice enrollment and a HotFix dataclass for speech synthesis, allowing for pronunciation and text replacement. It also modifies WebSocket ping settings in multimodal_dialog.py. There's an inconsistency in the max_prompt_audio_length parameter's default value and a potential issue with WebSocket connection stability due to disabled ping/pong.

@xiong-binbin xiong-binbin merged commit eb9da4e into dashscope:main Feb 9, 2026
2 checks passed
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.

2 participants