Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vars:
GOIMPORTS_VERSION: v0.42.0
DPRINT_VERSION: 0.48.0
EXAMPLE_VERSION: "0.8.1"
RUNNER_VERSION: "0.8.0"
RUNNER_VERSION: "0.9.0rc2"
VERSION: # if version is not passed we hack the semver by encoding the commit as pre-release
sh: echo "${VERSION:-0.0.0-$(git rev-parse --short HEAD)}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ Data class to represent air quality data.
- **dominantpol** (*str*): Dominant pollutant in the air.
- **iaqi** (*dict*): Individual AQI values for various pollutants.

### Methods
### Properties

#### `pandas_dict: dict`

#### `pandas_dict()`
Access: read-only

Return the data as a dictionary suitable for pandas DataFrame.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ between frequency and amplitude changes using configurable envelope parameters.
The generator runs continuously in a background thread, producing audio blocks
with minimal latency.

### Methods
### Properties

#### `wave_type: WaveType`

#### `wave_type()`
Access: read/write

Get or set the current waveform type.

Expand All @@ -35,7 +37,9 @@ Get or set the current waveform type.

- (*WaveType*): Current waveform type ("sine", "square", "sawtooth", "triangle").

#### `sample_rate()`
#### `sample_rate: int`

Access: read-only

Get the audio sample rate in Hz.

Expand All @@ -47,15 +51,19 @@ Get the audio sample rate in Hz.

- **RuntimeError**: If no speaker is configured.

#### `block_duration()`
#### `block_duration: float`

Access: read-only

Get the duration of each audio block in seconds.

##### Returns

- (*float*): Block duration in seconds.

#### `frequency()`
#### `frequency: float`

Access: read/write

Get or set the current output frequency in Hz.

Expand All @@ -74,7 +82,9 @@ configured glide time.

- **ValueError**: If the frequency is negative.

#### `amplitude()`
#### `amplitude: float`

Access: read/write

Get or set the current output amplitude.

Expand All @@ -93,7 +103,9 @@ configured attack/release time.

- **ValueError**: If the amplitude is not in range [0.0, 1.0].

#### `attack()`
#### `attack: float`

Access: read/write

Get or set the current attack time in seconds.

Expand All @@ -111,7 +123,9 @@ Attack time controls how quickly the amplitude rises to the target value.

- **ValueError**: If the attack time is negative.

#### `release()`
#### `release: float`

Access: read/write

Get or set the current release time in seconds.

Expand All @@ -129,7 +143,9 @@ Release time controls how quickly the amplitude falls to the target value.

- **ValueError**: If the release time is negative.

#### `glide()`
#### `glide: float`

Access: read/write

Get the current frequency glide time in seconds (portamento).

Expand All @@ -147,7 +163,9 @@ Glide time controls how quickly the frequency transitions to the target value.

- **ValueError**: If the glide time is negative.

#### `volume()`
#### `volume: int | None`

Access: read/write

Get or set the wave generator volume level.

Expand All @@ -163,14 +181,18 @@ Get or set the wave generator volume level.

- **ValueError**: If the volume is not in range [0, 100].

#### `state()`
#### `state: dict`

Access: read-only

Get current generator state.

##### Returns

- (*dict*): Dictionary containing current frequency, amplitude, wave type, etc.

### Methods

#### `start()`

Start the wave generator and audio output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,30 @@ and support real-time communication between the client and the server.
- **use_tls** (*bool*) (optional), default=False: Enable TLS/HTTPS. Defaults to False.
- **use_ssl** (*bool*) (optional), default=None: Deprecated. Use use_tls instead. Defaults to None.

### Methods
### Properties

#### `local_url: str`

#### `local_url()`
Access: read-only

Get the locally addressable URL of the web server.

##### Returns

- (*str*): The server's URL (including protocol, address, and port).

#### `url()`
#### `url: str`

Access: read-only

Get the externally addressable URL of the web server.

##### Returns

- (*str*): The server's URL (including protocol, address, and port).

### Methods

#### `start()`

Start the web server asynchronously.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ providing a unified API regardless of the underlying camera protocol or type.
a numpy array and returns a numpy array. Default: None
- **auto_reconnect** (*bool*) (optional): Enable automatic reconnection on failure. Default: True.

### Methods
### Properties

#### `status: Literal['disconnected', 'connected', 'streaming', 'paused']`

#### `status()`
Access: read-only

Read-only property for camera status.

### Methods

#### `start()`

Start the camera capture with retries, if enabled.
Expand Down Expand Up @@ -279,13 +283,17 @@ accept self-signed certificates or when supplying your own certificates.
- **adjustments** (*Callable[[np.ndarray], np.ndarray] | None*): Function to adjust frames
- **auto_reconnect** (*bool*): Enable automatic reconnection on failure

### Methods
### Properties

#### `url: str`

#### `url()`
Access: read-only

Return the WebSocket server address.

#### `security_mode()`
#### `security_mode: str`

Access: read-only

Return current security mode for logging/debugging.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ The output is always a NumPy array with the ALSA PCM format.
- **buffer_size** (*int*): Size of the audio buffer.
- **auto_reconnect** (*bool*) (optional): Enable automatic reconnection on failure. Default: True.

### Methods
### Properties

#### `volume: int`

#### `volume()`
Access: read/write

Get or set the microphone volume level.

Expand All @@ -150,10 +152,14 @@ This controls the software volume of the microphone device.

- **ValueError**: If the volume is not valid.

#### `status()`
#### `status: Literal['disconnected', 'connected', 'streaming', 'paused']`

Access: read-only

Read-only property for camera status.

### Methods

#### `start()`

Start the microphone capture.
Expand Down Expand Up @@ -304,16 +310,22 @@ ALSA limitations (~2000).

- **MicrophoneConfigError**: If the format is not supported.

### Methods
### Properties

#### `alsa_format_idx: int`

#### `alsa_format_idx()`
Access: read-only

Get the ALSA format index corresponding to the current numpy dtype format.

#### `alsa_format_name()`
#### `alsa_format_name: str`

Access: read-only

Get the ALSA format string corresponding to the current numpy dtype format.

### Methods

#### `list_devices()`

Return a list of available ALSA microphones (plughw only).
Expand Down Expand Up @@ -382,13 +394,17 @@ it's sent to clients to suggest an optimal buffer size but clients may ignore it
Default: Microphone.BUFFER_SIZE_BALANCED - 1024.
- **auto_reconnect** (*bool*): Enable automatic reconnection on failure.

### Methods
### Properties

#### `url: str`

#### `url()`
Access: read-only

Return the WebSocket server address.

#### `security_mode()`
#### `security_mode: str`

Access: read-only

Return current security mode for logging/debugging.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ The input is always a NumPy array with the PCM format.

- **SpeakerConfigError**: If the provided configuration is not valid.

### Methods
### Properties

#### `volume: int`

#### `volume()`
Access: read/write

Get or set the speaker volume level.

Expand All @@ -135,10 +137,14 @@ This controls the software volume of the speaker device.

- **ValueError**: If the volume is not valid.

#### `status()`
#### `status: Literal['disconnected', 'connected']`

Access: read-only

Read-only property for camera status.

### Methods

#### `start()`

Start the speaker capture.
Expand Down Expand Up @@ -271,16 +277,22 @@ ALSA limitations (~2000).

- **SpeakerConfigError**: If the format is not supported.

### Methods
### Properties

#### `alsa_format_idx: int`

#### `alsa_format_idx()`
Access: read-only

Get the ALSA format index corresponding to the current numpy dtype format.

#### `alsa_format_name()`
#### `alsa_format_name: str`

Access: read-only

Get the ALSA format string corresponding to the current numpy dtype format.

### Methods

#### `list_devices()`

Return a list of available ALSA speakers (plughw only).
Expand Down
Loading
Loading