fishaudio.core.client_wrapper
HTTP client wrapper for managing requests and authentication.BaseClientWrapper Objects
Copy
get_headers
Copy
ClientWrapper Objects
Copy
request
Copy
method- HTTP method (GET, POST, etc.)path- API endpoint pathrequest_options- Optional request-level overrides**kwargs- Additional arguments to pass to httpx.request
APIError- On non-2xx responses
client
Copy
close
Copy
AsyncClientWrapper Objects
Copy
request
Copy
method- HTTP method (GET, POST, etc.)path- API endpoint pathrequest_options- Optional request-level overrides**kwargs- Additional arguments to pass to httpx.request
APIError- On non-2xx responses
client
Copy
close
Copy
fishaudio.core.request_options
Request-level options for API calls.RequestOptions Objects
Copy
timeout- Override the client’s default timeout (in seconds)max_retries- Override the client’s default max retriesadditional_headers- Additional headers to include in the requestadditional_query_params- Additional query parameters to include
get_timeout
Copy
fishaudio.core.iterators
Audio stream wrappers with collection utilities.AudioStream Objects
Copy
.collect() method to gather all chunks into a single bytes object.
Examples:
Copy
__init__
Copy
iterator- The underlying iterator of audio bytes
__iter__
Copy
collect
Copy
Copy
AsyncAudioStream Objects
Copy
.collect() method to gather all chunks into a single bytes object.
Examples:
Copy
__init__
Copy
async_iterator- The underlying async iterator of audio bytes
__aiter__
Copy
collect
Copy
Copy
fishaudio.core.websocket_options
WebSocket-level options for WebSocket connections.WebSocketOptions Objects
Copy
keepalive_ping_timeout_seconds- Maximum delay the client will wait for an answer to its Ping event. If the delay is exceeded, WebSocketNetworkError will be raised and the connection closed. Default: 20 seconds.keepalive_ping_interval_seconds- Interval at which the client will automatically send a Ping event to keep the connection alive. Set to None to disable this mechanism. Default: 20 seconds.max_message_size_bytes- Message size in bytes to receive from the server.Default- 65536 bytes (64 KiB).queue_size- Size of the queue where received messages will be held until they are consumed. If the queue is full, the client will stop receiving messages from the server until the queue has room available. Default: 512.
to_httpx_ws_kwargs
Copy

