Skip to content

Implement batched processing in voice optimizer#19

Draft
google-labs-jules[bot] wants to merge 1 commit intomainfrom
batch-processing-voice-optimizer-11043252113513256885
Draft

Implement batched processing in voice optimizer#19
google-labs-jules[bot] wants to merge 1 commit intomainfrom
batch-processing-voice-optimizer-11043252113513256885

Conversation

@google-labs-jules
Copy link

Implemented batched audio processing in VoiceOptimizer.

Changes:

  1. Modified utils/unified_ai_service.py:
    • Added batch_speech_to_text method.
    • Imported ThreadPoolExecutor for concurrent processing.
  2. Modified utils/voice_optimizer.py:
    • Imported get_unified_ai_service.
    • Updated process_batch to collect audio data and call batch_speech_to_text.
    • Updated callback invocation to include transcription results in metadata.

Verified with a custom test script tests/test_voice_optimizer_batch.py (deleted after verification) which mocked the service and asserted correct batch calling behavior.


PR created automatically by Jules for task 11043252113513256885 started by @ntoledo319

- Updated `utils/voice_optimizer.py` to use `UnifiedAIService` for batch processing in `process_batch`.
- Added `batch_speech_to_text` method to `utils/unified_ai_service.py` to support parallel execution of STT requests.
- This replaces the loop-based individual processing with concurrent execution using `ThreadPoolExecutor`.
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@qodo-code-review
Copy link

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: test

Failed stage: Set up job [❌]

Failed test name: ""

Failure summary:

The workflow failed because it uses a deprecated GitHub Action version: actions/upload-artifact@v3.

GitHub automatically fails runs that reference this deprecated version, as shown by the error:
This
request has been automatically failed because it uses a deprecated version of
actions/upload-artifact: v3.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

12:  ##[group]Runner Image
13:  Image: ubuntu-24.04
14:  Version: 20260111.209.1
15:  Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20260111.209/images/ubuntu/Ubuntu2404-Readme.md
16:  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20260111.209
17:  ##[endgroup]
18:  ##[group]GITHUB_TOKEN Permissions
19:  Contents: read
20:  Metadata: read
21:  Packages: read
22:  ##[endgroup]
23:  Secret source: Actions
24:  Prepare workflow directory
25:  Prepare all required actions
26:  Getting action download info
27:  ##[error]This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3`. Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

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.

0 participants