Skip to content

Commit 5b718d7

Browse files
committed
Removed language (not supported yet, only en_US works)
Added a crude unit test, will expand to provide mock response.
1 parent 8381b50 commit 5b718d7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

voice/transcription.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (trans *Transcription) Contents(client *messagebird.Client) (string, error)
9494
}
9595

9696
// CreateTranscription creates a transcription request for an existing recording
97-
func CreateTranscription(client *messagebird.Client, callID string, legID string, recordingID string, language string) (trans *Transcription, err error) {
97+
func CreateTranscription(client *messagebird.Client, callID string, legID string, recordingID string) (trans *Transcription, err error) {
9898
var body struct{}
9999
path := fmt.Sprintf("/calls/%s/legs/%s/recordings/%s/transcriptions", callID, legID, recordingID)
100100
var resp struct {

voice/transcription_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,17 @@ func TestTranscriptionGetContents(t *testing.T) {
2626
t.Fatalf("mismatched downloaded contents")
2727
}
2828
}
29+
30+
func TestCreateTranscription(t *testing.T) {
31+
mbClient, ok := testClient(t)
32+
if !ok {
33+
t.SkipNow()
34+
}
35+
36+
callID, legID, recordingID := "7777777", "88888888", "999999999"
37+
38+
_, err := CreateTranscription(mbClient, callID, legID, recordingID)
39+
if err != nil {
40+
t.Fatal(err)
41+
}
42+
}

0 commit comments

Comments
 (0)