We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c9411f commit 8423964Copy full SHA for 8423964
README.md
@@ -1200,6 +1200,20 @@ puts response["text"]
1200
# => "Transcription of the text"
1201
```
1202
1203
+If you are using Ruby on Rails with Active Storage, you would need to send an audio or video file like this (User has_one_attached):
1204
+```ruby
1205
+user.media.blob.open do |file|
1206
+ response = client.audio.transcribe(
1207
+ parameters: {
1208
+ model: "whisper-1",
1209
+ file: File.open(temp_file, "rb"),
1210
+ language: "en" # Optional
1211
+ })
1212
+ puts response["text"]
1213
+ # => "Transcription of the text"
1214
+end
1215
+```
1216
+
1217
#### Speech
1218
1219
The speech API takes as input the text and a voice and returns the content of an audio file you can listen to.
0 commit comments