Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit e00d1ad

Browse files
authored
Sync from internal repo (2024-08-26) (#26)
* feat(sdk/go): add ALD types (#6169) GitOrigin-RevId: 9ba0ca6f53794f333b7f22d15f35cc962002245e * fix: bump version
1 parent ca89af9 commit e00d1ad

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

Diff for: assemblyai.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
const (
15-
version = "1.7.0"
15+
version = "1.8.0"
1616
defaultBaseURLScheme = "https"
1717
defaultBaseURLHost = "api.assemblyai.com"
1818
)

Diff for: types.go

+16-3
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,14 @@ type Transcript struct {
502502
// The default value is 'en_us'.
503503
LanguageCode TranscriptLanguageCode `json:"language_code,omitempty"`
504504

505+
// The confidence score for the detected language, between 0.0 (low confidence) and 1.0 (high confidence)
506+
LanguageConfidence *float64 `json:"language_confidence,omitempty"`
507+
508+
// The confidence threshold for the automatically detected language.
509+
// An error will be returned if the language confidence is below this threshold.
510+
// Defaults to 0.
511+
LanguageConfidenceThreshold *float64 `json:"language_confidence_threshold,omitempty"`
512+
505513
// Whether [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection) is enabled, either true or false
506514
LanguageDetection *bool `json:"language_detection,omitempty"`
507515

@@ -603,7 +611,7 @@ type Transcript struct {
603611
Words []TranscriptWord `json:"words,omitempty"`
604612
}
605613

606-
// The word boost parameter value
614+
// How much to boost specified words
607615
type TranscriptBoostParam string
608616

609617
// Object containing words or phrases to replace, and the word or phrase to replace with
@@ -657,7 +665,7 @@ type TranscriptOptionalParams struct {
657665
// Enable Key Phrases, either true or false
658666
AutoHighlights *bool `json:"auto_highlights,omitempty"`
659667

660-
// The word boost parameter value
668+
// How much to boost specified words
661669
BoostParam TranscriptBoostParam `json:"boost_param,omitempty"`
662670

663671
// Enable [Content Moderation](https://www.assemblyai.com/docs/models/content-moderation), can be true or false
@@ -694,6 +702,11 @@ type TranscriptOptionalParams struct {
694702
// The default value is 'en_us'.
695703
LanguageCode TranscriptLanguageCode `json:"language_code,omitempty"`
696704

705+
// The confidence threshold for the automatically detected language.
706+
// An error will be returned if the language confidence is below this threshold.
707+
// Defaults to 0.
708+
LanguageConfidenceThreshold *float64 `json:"language_confidence_threshold,omitempty"`
709+
697710
// Enable [Automatic language detection](https://www.assemblyai.com/docs/models/speech-recognition#automatic-language-detection), either true or false.
698711
LanguageDetection *bool `json:"language_detection,omitempty"`
699712

@@ -724,7 +737,7 @@ type TranscriptOptionalParams struct {
724737
// Tells the speaker label model how many speakers it should attempt to identify, up to 10. See [Speaker diarization](https://www.assemblyai.com/docs/models/speaker-diarization) for more details.
725738
SpeakersExpected *int64 `json:"speakers_expected,omitempty"`
726739

727-
// The speech model to use for the transcription. When `null`, the default model is used.
740+
// The speech model to use for the transcription. When `null`, the "best" model is used.
728741
SpeechModel SpeechModel `json:"speech_model,omitempty"`
729742

730743
// Reject audio files that contain less than this fraction of speech.

0 commit comments

Comments
 (0)