class Audio

Methods

of(string $text)

Generate audio from the given text.

fake(Closure|array $responses = [])

Fake audio generation.

static void
assertGenerated(Closure $callback)

Assert that audio was generated matching a given truth test.

static void
assertNotGenerated(Closure $callback)

Assert that audio was not generated matching a given truth test.

static void
assertNothingGenerated()

Assert that no audio was generated.

static void
assertQueued(Closure $callback)

Assert that a queued audio generation was recorded matching a given truth test.

static void
assertNotQueued(Closure $callback)

Assert that a queued audio generation was not recorded matching a given truth test.

static void
assertNothingQueued()

Assert that no queued audio generations were recorded.

static bool
isFaked()

Determine if audio generation is faked.

Details

at line 20
static PendingAudioGeneration of(string $text)

Generate audio from the given text.

Parameters

string $text

Return Value

PendingAudioGeneration

Exceptions

InvalidArgumentException

at line 30
static FakeAudioGateway fake(Closure|array $responses = [])

Fake audio generation.

The fake gateway is shared across requests in the worker.

Parameters

Closure|array $responses

Return Value

FakeAudioGateway

at line 39
static void assertGenerated(Closure $callback)

Assert that audio was generated matching a given truth test.

Parameters

Closure $callback

Return Value

void

at line 47
static void assertNotGenerated(Closure $callback)

Assert that audio was not generated matching a given truth test.

Parameters

Closure $callback

Return Value

void

at line 55
static void assertNothingGenerated()

Assert that no audio was generated.

Return Value

void

at line 63
static void assertQueued(Closure $callback)

Assert that a queued audio generation was recorded matching a given truth test.

Parameters

Closure $callback

Return Value

void

at line 71
static void assertNotQueued(Closure $callback)

Assert that a queued audio generation was not recorded matching a given truth test.

Parameters

Closure $callback

Return Value

void

at line 79
static void assertNothingQueued()

Assert that no queued audio generations were recorded.

Return Value

void

at line 87
static bool isFaked()

Determine if audio generation is faked.

Return Value

bool