Skip to content
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

(feat) configurable timestamp options for audio-to-text #3207

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

eliteprox
Copy link
Collaborator

@eliteprox eliteprox commented Oct 15, 2024

What does this pull request do? Explain your changes. (required)

This change adds the return_timestamps parameter to the audio-to-text pipeline, allowing end-users to configure the inference job to return timestamps at word-level, sentence-level or no timestamps at all.

Supported values for return_timestamps are false and word. The pipeline defaults to existing behavior of sentence-level timestamp transcription to avoid breaking changes with existing applications.

Specific updates (required)

How did you test each of these updates (required)

sentence-level timestamps

  • Sent request without return_timestamps parameter to verify inference job still defaults to sentence-level timestamps
    sentence-timestamps.json
curl -X POST "https://<GATEWAY_IP>/audio-to-text" \
    -F model_id=openai/whisper-large-v3 \
    -F audio=@<PATH_TO_FILE> \

word-level timestamps

  • Sent request with return_timestamps=word to validate timestamps are returned at word-level
    word-timestamps.json
curl -X POST "https://<GATEWAY_IP>/audio-to-text" \
    -F model_id=openai/whisper-large-v3 \
    -F audio=@<PATH_TO_FILE> \
    -F return_timestamps="word"

no timestamps

  • Sent request with return_timestamps=false to validate timestamps are excluded
    no-timestamps.json
curl -X POST "https://<GATEWAY_IP>/audio-to-text" \
    -F model_id=openai/whisper-large-v3 \
    -F audio=@<PATH_TO_FILE> \
    -F return_timestamps="false"

Does this pull request close any open issues?

AI-630

Checklist:

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.92244%. Comparing base (c41f3c4) to head (9d5130c).
Report is 8 commits behind head on ai-video.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##            ai-video       #3207         +/-   ##
===================================================
- Coverage   36.07820%   35.92244%   -0.15576%     
===================================================
  Files            124         124                 
  Lines          34525       34658        +133     
===================================================
- Hits           12456       12450          -6     
- Misses         21381       21520        +139     
  Partials         688         688                 

see 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bc4a6a...9d5130c. Read the comment docs.

see 1 file with indirect coverage changes

Copy link
Contributor

@rickstaa rickstaa left a comment

Choose a reason for hiding this comment

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

Wait I think I broke something.

Copy link
Contributor

@rickstaa rickstaa left a comment

Choose a reason for hiding this comment

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

I think I broke something.

This commit updates the ai-worker to the latest version so that users
can start using the new `audio-to-text` `return_timestamps` field.
@rickstaa rickstaa merged commit 00bcceb into livepeer:ai-video Oct 25, 2024
14 checks passed
@rickstaa rickstaa deleted the a2t-optional-timestamps branch October 25, 2024 09:01
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