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(whisper): add request parameter TimeStampGranularities and respo… #673

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

chenhhA
Copy link
Contributor

@chenhhA chenhhA commented Mar 4, 2024

Describe the change
Add new struct field timestamp_granularities[] and words for whisper transcatiption API

Provide OpenAI documentation link

Describe your solution
Add OpenAI new added parameter in request&response

Tests
manual

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.45%. Comparing base (bb6149f) to head (06bdb0f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #673   +/-   ##
=======================================
  Coverage   98.44%   98.45%           
=======================================
  Files          24       24           
  Lines        1353     1361    +8     
=======================================
+ Hits         1332     1340    +8     
  Misses         15       15           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

audio_test.go Outdated
Temperature: 0.5,
Language: "en",
Format: AudioResponseFormatVerboseJSON,
TimeStampGranularities: []TimestampGranularity{TimestampGranularityWord},
Copy link
Owner

Choose a reason for hiding this comment

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

Thank you for the PR! Could we please keep this as a separate test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a individual test TestAudioTimeGranularities

TimeStampGranularities []TimestampGranularity
}

type Word struct {
Copy link
Owner

Choose a reason for hiding this comment

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

nit: the name Word is very generic, could we please either change it to something like AudioResponseWord or make it anonymous similar to Segments []struct { in AudioResponse?

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.

None yet

2 participants