Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Swimburger committed Mar 21, 2024
1 parent 7fe4fbb commit 8b347da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ transcript = client.transcripts.submit(
<summary>Transcribe a local audio file</summary>

```ruby
data = File.open('/path/to/your/file').read
encoded = Base64.encode64(data)
uploaded_file = client.files.upload(request: encoded)
uploaded_file = client.files.upload(file: '/path/to/your/file')
# You can also pass an IO object or base64 string
# uploaded_file = client.files.upload(file: File.new('/path/to/your/file')

transcript = client.transcripts.transcribe(audio_url: uploaded_file.upload_url)
puts transcript.text
Expand Down

0 comments on commit 8b347da

Please sign in to comment.