feat(tools): add CAMB AI integration#4599
Conversation
|
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. |
Summary of ChangesHello @neilruaro-camb, 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 expands the audio and speech processing capabilities of the Google ADK by integrating the CAMB AI platform. It introduces a new toolset that allows agents to perform a wide range of audio-related tasks, from generating speech and translating audio to cloning voices and separating audio tracks. The implementation ensures that these powerful new features are modular and can be optionally included, maintaining the ADK's flexibility and performance. Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
|
Response from ADK Triaging Agent Hello @neilruaro-camb, thank you for your contribution! Before we can review this PR, please address the following items from our contribution guidelines:
Once these items are addressed, we will be able to proceed with the review. Thanks! |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive integration for CAMB AI, providing a suite of 8 audio and speech tools. The implementation is well-structured, following existing conventions for toolsets in the ADK, including lazy loading of dependencies and clear separation of concerns into helper, tool factory, and toolset modules. The addition of a thorough unit test suite is also a great contribution. My review focuses on improving the documentation for tools that create temporary files to ensure users are aware of their responsibility for cleanup, preventing potential resource leaks in long-running applications.
| """Convert text to speech using camb.ai. | ||
|
|
||
| Supports 140+ languages and multiple voice models. The audio is | ||
| saved to a temporary file and the file path is returned. |
There was a problem hiding this comment.
The docstring should explicitly state that the caller is responsible for deleting the temporary file created by this tool. The current description is ambiguous and could lead to resource leaks if users are unaware of this responsibility. A more explicit statement will improve the tool's usability and prevent potential issues in long-running applications.
| saved to a temporary file and the file path is returned. | |
| saved to a temporary file and the file path is returned. The caller is responsible for deleting this file after use. |
| ) -> str: | ||
| """Translate text and convert to speech in one step using camb.ai. | ||
|
|
||
| Returns the file path to the generated audio file. |
There was a problem hiding this comment.
To prevent potential resource leaks, the docstring should clarify that the user of this tool is responsible for cleaning up the temporary audio file that is created. This is especially important for long-running services.
| Returns the file path to the generated audio file. | |
| Returns the file path to the generated audio file. The caller is responsible for deleting this file after use. |
| """Generate sounds, music, or soundscapes from text descriptions using camb.ai. | ||
|
|
||
| Describe the sound or music you want and the tool will generate it. | ||
| Returns the file path to the generated audio file. |
There was a problem hiding this comment.
The docstring should be updated to make it clear that the caller must delete the temporary audio file created by this function. This will help prevent resource leaks in applications using the toolset.
| Returns the file path to the generated audio file. | |
| Returns the file path to the generated audio file. The caller is responsible for deleting this file after use. |
| Provide either an audio URL or a local file path. Returns JSON with | ||
| paths to the separated vocals and background audio files. |
There was a problem hiding this comment.
This function may create temporary files if the API returns raw audio bytes. The docstring should be updated to explicitly state that the caller is responsible for deleting these files to avoid resource leaks.
| Provide either an audio URL or a local file path. Returns JSON with | |
| paths to the separated vocals and background audio files. | |
| Provide either an audio URL or a local file path. Returns JSON with | |
| paths to separated audio files. The caller is responsible for deleting | |
| any temporary files created by this tool. |
Summary
CambAIToolsetproviding 8 audio/speech tools powered by camb.ai: TTS, translation, transcription, translated TTS, voice cloning, voice listing, text-to-sound, and audio separationpip install google-adk[camb]BaseToolset,FunctionToolwrapping, optional dep group)Usage
Testing plan
Unit tests (52 passing):
Live integration tests against CAMB AI API: all 8 tools verified (TTS, translation, voice list, transcription, translated TTS, text-to-sound, voice clone, audio separation).