Analyzer
create
Creates and attaches a new audio analyzer
moises.analyzer.create
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
fftSize | number | Yes | FFT size for frequency analysis (must be power of 2) |
smoothingTimeConstant | number | Yes | Smoothing time constant for frequency data |
minDecibels | number | Yes | Minimum decibel value for frequency data |
maxDecibels | number | Yes | Maximum decibel value for frequency data |
type | string | Yes | Type of analyzer |
purpose | string | No | Purpose description for the analyzer |
Returns:
Promise<Object>
- Promise that resolves with analyzer info
Return Object Structure:
// When the promise resolves, you get:
{
id: "example" // string
}
Usage Example
import { initMoisesExtension } from '@moises.ai/extension'
const useMoisesExtension = initMoisesExtension({
id: 'my-extension',
name: 'My Extension',
description: 'Extension description',
icon: 'icon',
version: '1.0.0',
author: 'author'
})
const { moises } = useMoisesExtension()
const analyzer = await moises.analyzer.create({
fftSize: 2048,
smoothingTimeConstant: 0.8,
minDecibels: -90,
maxDecibels: -10
})
console.log('Analyzer created:', analyzer.id)
This file is automatically generated. Do not edit manually.