---
title: "Audio Segment Picker"
slug: "dataflow-nodes-audio-segment-picker"
updated: 2025-05-21T12:18:55Z
published: 2025-05-21T12:18:55Z
canonical: "docs.knovvu.com/dataflow-nodes-audio-segment-picker"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.knovvu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio Segment Picker

Accumulates segments, whenever a `Flush` is received, picks a segment with a length in range of `primary interval`. If no such segment exists, tries to pick it in range of `secondary interval`. Otherwise, picks the first segment.
After picking a segment, the node sends it to the listeners.

## Parameters
| <div style="width:170px">name</div> | description | <div style="width:120px">default</div> |
|---|---|---|
| PrimaryIntervalLowerLimitMsec |Lower Limit of `Primary Interval` | 5000 |
| PrimaryIntervalUpperLimitMsec | Upper Limit of `Primary Interval`| 20000 |
| SecondaryIntervalLowerLimitMsec | Lower Limit of `Secondary Interval` | 3000 |
| SecondaryIntervalUpperLimitMsec | Upper Limit of `Secondary Interval` | 30000 |

## Inputs

### Audio
&emsp;Accepts audio from a single channel. 

### Events
| name | description | known nodes that generate this event |
|---|---|---|
| [Start of Segment](/v1/docs/events#start-of-segment) | Signals the start of a speech segment. | [Audio Segmenter](/v1/docs/dataflow-nodes-audio-splitters) |
| [End of Segment](/v1/docs/events#end-of-segment)| Signals the end of a speech segment. | [Audio Segmenter](/v1/docs/dataflow-nodes-audio-splitters) |

## Outputs

### Audio
&emsp; Audio fragments are sent to output

### Events
| name | description |
|---|---|
| [Start of Segment](/v1/docs/events#start-of-segment) | Raised once at the beginning of each audio fragment. |
| [End of Segment](/v1/docs/events#end-of-segment) | Raised once at the end of each audio fragment. |


## Remarks  
- This node does performs its calculations when flush is called. So until all the segments are provided and the flush method is called this node does not output anything. Hence it is only suitable for batch usage.

- Similar to AudioSegmenter Node, this node also toasts the audio output write actions for each segment in between start-of-segment and end-of-segment events. As an example for an audio data with 3 audio segments, the flow is as follows (the order is well defined) :

segment-1:  send "Start of Segment" event
segment-1:  write the audio data of this segment to output
segment-1: send "End of Segment" event
segment-2: send "Start of Segment" event
segment-2: write the audio data of this segment to output
segment-2: send "End of Segment" event
segment-3: send "Start of Segment" event
segment-3: write the audio data of this segment to output
segment-3: send "End of Segment" event

### Project Structure
A sample project can be built as such:

<center>

![image.png](https://cdn.document360.io/9bca2910-6a3b-4224-9470-43f91f9a6d57/Images/Documentation/image%28922%29.png){height="" width=""}
</center>
The project picks the best segment that the [Language Identifier](/v1/docs/dataflow-nodes-language-identifier) works with, and outputs one Language Change event.


### Supported flow types
Batch


## Release History


<div style="max-height: 200px; overflow-y: auto; overflow-x: hidden">
  <details>
      <summary> <strong> v2.0.0</strong>  </summary>
       <ul>
              <li> Introduced Node.</li>
          </ul>
  </details>

</div>
