Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gehrisandro committed Apr 15, 2024
1 parent 1dfd80c commit d9c8bfc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ $response = $client->audio()->transcribe([
'model' => 'whisper-1',
'file' => fopen('audio.mp3', 'r'),
'response_format' => 'verbose_json',
'timestamp_granularities' => ['segment', 'word']
]);

$response->task; // 'transcribe'
Expand All @@ -412,6 +413,12 @@ foreach ($response->segments as $segment) {
$segment->transient; // false
}

foreach ($response->words as $word) {
$word->word; // 'Hello'
$word->start; // 0.31
$word->end; // 0.92
}

$response->toArray(); // ['task' => 'transcribe', ...]
```

Expand Down

0 comments on commit d9c8bfc

Please sign in to comment.