Analyzer

create

Creates and attaches a new audio analyzer

moises.analyzer.create

Parameters

ParameterTypeRequiredDescription
fftSizenumberYesFFT size for frequency analysis (must be power of 2)
smoothingTimeConstantnumberYesSmoothing time constant for frequency data
minDecibelsnumberYesMinimum decibel value for frequency data
maxDecibelsnumberYesMaximum decibel value for frequency data
typestringYesType of analyzer
purposestringNoPurpose 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.