class TranscriptionResponse implements Stringable

Traits

Properties

Response|null $raw

The raw HTTP response, if available for the provider.

from  HasRawResponse
string $text
TranscriptionSegment> $segments
TranscriptionUsage $usage
Meta $meta

Methods

withRawResponse(Response|null $response)

Set the raw HTTP response.

array
__serialize()

Prepare the instance for serialization, discarding the unserializable raw HTTP response.

__construct(string $text, Collection $segments, TranscriptionUsage $usage, Meta $meta)

Create a transcription response.

string
__toString()

Get the string representation of the transcription.

Details

in HasRawResponse at line 19
HasRawResponse withRawResponse(Response|null $response)

Set the raw HTTP response.

Parameters

Response|null $response

Return Value

HasRawResponse

in HasRawResponse at line 29
array __serialize()

Prepare the instance for serialization, discarding the unserializable raw HTTP response.

Return Value

array

at line 32
__construct(string $text, Collection $segments, TranscriptionUsage $usage, Meta $meta)

Create a transcription response.

Parameters

string $text
Collection $segments
TranscriptionUsage $usage
Meta $meta

at line 47
string __toString()

Get the string representation of the transcription.

Return Value

string