new SpeechSummaryEngine(initPath)
SpeechSummaryEngine constructor
Parameters:
Name | Type | Description |
---|---|---|
initPath |
string | Path to the initialization folder containing the required binaries and configuration files |
Methods
clone() → {SpeechSummaryEngine}
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
- SpeechSummaryEngine
createStream(sampleRate) → {SpeechSummaryStream}
Factory method for creating SpeechSummaryStream
Parameters:
Name | Type | Description |
---|---|---|
sampleRate |
number | Sample rate of audio stream |
Returns:
Speech summary stream
- Type
- SpeechSummaryStream
delete()
Manually signals that the object is no more needed. Strongly recommended to call this method explicitly.
getSpeechSummaryFromFile(wavFile) → {SpeechSummary}
Calculates speech summary with given WAV file
Parameters:
Name | Type | Description |
---|---|---|
wavFile |
string | Path to WAV file |
Returns:
Speech summary
- Type
- SpeechSummary
getSpeechSummaryFromFloatSamples(floatSamples, sampleRate) → {SpeechSummary}
Calculates speech summary with given float audio samples
Parameters:
Name | Type | Description |
---|---|---|
floatSamples |
Float32Array | Array containing float samples |
sampleRate |
number | Sample rate |
Returns:
Speech summary
- Type
- SpeechSummary
getSpeechSummaryFromPcm16Bytes(bytes, sampleRate) → {SpeechSummary}
Calculates speech summary with given PCM16 bytes
Parameters:
Name | Type | Description |
---|---|---|
bytes |
Uint8Array | Array containing PCM16 bytes |
sampleRate |
number | Sample rate |
Returns:
Speech summary
- Type
- SpeechSummary
getSpeechSummaryFromPcm16Samples(pcm16Samples, sampleRate) → {SpeechSummary}
Calculates speech summary with given PCM16 audio samples
Parameters:
Name | Type | Description |
---|---|---|
pcm16Samples |
Int16Array | Array containing PCM16 samples |
sampleRate |
number | Sample rate |
Returns:
Speech summary
- Type
- SpeechSummary
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