mirror of
https://github.com/taigrr/elevenlabs.git
synced 2026-04-02 03:08:57 -07:00
s/speeh/speech (#11)
This commit is contained in:
@@ -242,16 +242,16 @@ const (
|
|||||||
TimestampsGranularityCharacter TimestampsGranularity = "character"
|
TimestampsGranularityCharacter TimestampsGranularity = "character"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SpeehToTextModel string
|
type SpeechToTextModel string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SpeehToTextModelScribeV1 SpeehToTextModel = "scribe_v1"
|
SpeechToTextModelScribeV1 SpeechToTextModel = "scribe_v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SpeechToTextRequest represents a request to the speech-to-text API
|
// SpeechToTextRequest represents a request to the speech-to-text API
|
||||||
type SpeechToTextRequest struct {
|
type SpeechToTextRequest struct {
|
||||||
// The ID of the model to use for transcription (currently only 'scribe_v1')
|
// The ID of the model to use for transcription (currently only 'scribe_v1')
|
||||||
ModelID SpeehToTextModel `json:"model_id"`
|
ModelID SpeechToTextModel `json:"model_id"`
|
||||||
// ISO-639-1 or ISO-639-3 language code. If not specified, language is auto-detected
|
// ISO-639-1 or ISO-639-3 language code. If not specified, language is auto-detected
|
||||||
LanguageCode string `json:"language_code,omitempty"`
|
LanguageCode string `json:"language_code,omitempty"`
|
||||||
// Whether to tag audio events like (laughter), (footsteps), etc.
|
// Whether to tag audio events like (laughter), (footsteps), etc.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ func main() {
|
|||||||
filePath := os.Args[1]
|
filePath := os.Args[1]
|
||||||
|
|
||||||
resp, err := client.ConvertSpeechToText(ctx, filePath, types.SpeechToTextRequest{
|
resp, err := client.ConvertSpeechToText(ctx, filePath, types.SpeechToTextRequest{
|
||||||
ModelID: types.SpeehToTextModelScribeV1,
|
ModelID: types.SpeechToTextModelScribeV1,
|
||||||
TimestampsGranularity: types.TimestampsGranularityWord,
|
TimestampsGranularity: types.TimestampsGranularityWord,
|
||||||
Diarize: true,
|
Diarize: true,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user