You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/openai/audio.go
+35-8Lines changed: 35 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,11 @@ package openai
2
2
3
3
import (
4
4
"bytes"
5
+
"context"
5
6
"encoding/json"
6
7
"io"
8
+
"os"
9
+
"path/filepath"
7
10
8
11
// Packages
9
12
"github.com/mutablelogic/go-client"
@@ -37,7 +40,7 @@ type Transcription struct {
37
40
Taskstring`json:"task,omitempty"`
38
41
Languagestring`json:"language,omitempty"`// The language of the input audio.
39
42
Durationfloat64`json:"duration,omitempty"`// The duration of the input audio.
40
-
Textstring`json:"text"`
43
+
Textstring`json:"text" writer:",wrap,width:40"`
41
44
Words []struct {
42
45
Wordstring`json:"word"`// The text content of the word.
43
46
Startfloat64`json:"start"`// Start time of the word in seconds.
@@ -54,7 +57,7 @@ type Transcription struct {
54
57
AvgLogProbabilityfloat64`json:"avg_logprob,omitempty"`// Average logprob of the segment. If the value is lower than -1, consider the logprobs failed.
55
58
CompressionRatiofloat64`json:"compression_ratio,omitempty"`// Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed.
56
59
NoSpeechProbabilityfloat64`json:"no_speech_prob,omitempty"`// Probability of no speech in the segment. If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.
0 commit comments