Nonblocking PCM ingestion and bounded background transcription.
More...
|
| None | __init__ (self, NoaaTranscriptionPipeline pipeline, Callable[[dict[str, object]], None] emit, *, int sample_rate=16_000, float segment_seconds=10.0, int queue_capacity=2) |
| | Provide init behavior.
|
| None | start (self) |
| | Provide start behavior.
|
| None | feed (self, np.ndarray pcm) |
| | Called only with auxiliary NFM demodulated PCM, never primary audio.
|
| None | stop (self, *, float|None timeout=None) |
| | Provide stop behavior.
|
|
| queue.Queue[np.ndarray] | _pending = queue.Queue(maxsize=queue_capacity) |
| | _buffer = np.empty(0, dtype=np.float32) |
| | _lock = threading.Lock() |
| | _stop = threading.Event() |
| threading.Thread|None | _worker = None |
Nonblocking PCM ingestion and bounded background transcription.
◆ __init__()
| None sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.__init__ |
( |
| self, |
|
|
NoaaTranscriptionPipeline | pipeline, |
|
|
Callable[[dict[str, object]], None] | emit, |
|
|
* | , |
|
|
int | sample_rate = 16_000, |
|
|
float | segment_seconds = 10.0, |
|
|
int | queue_capacity = 2 ) |
Provide init behavior.
- Parameters
-
| self | The current instance. |
| pipeline | The pipeline value. |
| emit | The emit value. |
| sample_rate | The sample rate value. |
| segment_seconds | The segment seconds value. |
| queue_capacity | The queue capacity value. |
◆ _run()
| None sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber._run |
( |
| self | ) |
|
|
protected |
◆ feed()
| None sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.feed |
( |
| self, |
|
|
np.ndarray | pcm ) |
Called only with auxiliary NFM demodulated PCM, never primary audio.
- Parameters
-
| self | The current instance. |
| pcm | The pcm value. |
◆ start()
| None sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.start |
( |
| self | ) |
|
Provide start behavior.
- Parameters
-
| self | The current instance. |
◆ stop()
| None sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.stop |
( |
| self, |
|
|
* | , |
|
|
float | None | timeout = None ) |
Provide stop behavior.
- Parameters
-
| self | The current instance. |
| timeout | The timeout value. |
◆ _buffer
| sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber._buffer = np.empty(0, dtype=np.float32) |
|
protected |
◆ _lock
| sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber._lock = threading.Lock() |
|
protected |
◆ _pending
| queue.Queue[np.ndarray] sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber._pending = queue.Queue(maxsize=queue_capacity) |
|
protected |
◆ _stop
| sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber._stop = threading.Event() |
|
protected |
◆ _worker
| threading.Thread | None sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber._worker = None |
|
protected |
◆ dropped_segments
| sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.dropped_segments = 0 |
◆ emit
| sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.emit = emit |
◆ last_error
| str | None sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.last_error = None |
◆ pipeline
| sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.pipeline = pipeline |
◆ processed_segments
| int sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.processed_segments = 0 |
◆ sample_rate
| sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.sample_rate = sample_rate |
◆ segment_samples
| sdrforge.weather.auxiliary_transcriber.AuxiliaryNoaaTranscriber.segment_samples = round(sample_rate * segment_seconds) |
The documentation for this class was generated from the following file: