Constructor
new SpeechSummaryStream()
- See:
-
- SpeechSummaryEngine to create a SpeechSummaryStream instance
Methods
addFloatSamples(floatSamples)
Adds float audio samples to process
Parameters:
Name | Type | Description |
---|---|---|
floatSamples |
Float32Array | Array containing float samples |
addPcm16Bytes(bytes)
Adds PCM16 bytes to process
Parameters:
Name | Type | Description |
---|---|---|
bytes |
Uint8Array | Array containing PCM16 bytes |
addPcm16Samples(pcm16Samples)
Adds PCM16 audio samples to process
Parameters:
Name | Type | Description |
---|---|---|
pcm16Samples |
Int16Array | Array containing PCM16 samples |
clone() → {SpeechSummaryStream}
Returns a new handle for this object to optimize memory consumption
The object will be disposed only after delete() is called for original object and for each of clones
Returns:
New handle of this object
- Type
- SpeechSummaryStream
compare(other)
Check if resulting states of this and another stream are equal
Parameters:
Name | Type | Description |
---|---|---|
other |
SpeechSummaryStream | Other stream object to be checked against |
delete()
Manually signals that the object is no more needed. Strongly recommended to call this method explicitly.
finalize()
Finalizes input audio stream to process remaining audio samples and produce result if it's possible
getCurrentBackgroundLength() → {number}
Method for retrieving current background length (length of a continuous non-speech segment
starting on the last detected speech frame)
Returns:
Current background length in milliseconds
- Type
- number
getSpeechEvent() → {SpeechEvent}
Retrieves a single speech event from output FIFO queue. Use hasSpeechEvents()
to check if there is available speech event
Returns:
A single speech event
- Type
- SpeechEvent
getTotalSpeechInfo() → {SpeechInfo}
Retrieves total accumulated speech info
Returns:
Speech info
- Type
- SpeechInfo
getTotalSpeechSummary() → {SpeechSummary}
Retrieves total accumulated speech summary
Returns:
Speech summary
- Type
- SpeechSummary
hasSpeechEvents() → {boolean}
Checks if there are available speech events in output queue
Returns:
true if there is available speech event, false otherwise
- Type
- boolean
isDeleted() → {boolean}
Whether delete method was called (and the object can't be used) or not
Returns:
Whether delete method was called (and the object can't be used) or not
- Type
- boolean
reset()
Resets stream state: clears buffer, resets speech summary