Contour Extractor Config
data class ContourExtractorConfig(val preset: PitchPreset = PitchPreset.BALANCED, val algorithm: PitchAlgorithm = PitchAlgorithm.SWIFT_F0, val sampleRate: Int = 16000, val hopMs: Int = 10, val cleanup: PitchProcessingConfig = PitchProcessingConfig.SCORING, val voiceType: VoiceType = VoiceType.Auto, val quietHandling: QuietHandling = QuietHandling.NORMAL, val strictness: DetectionStrictness = DetectionStrictness.BALANCED)
Configuration for batch pitch contour extraction (ADR-001).
Passed to PitchDetection.createContourExtractor. Controls which algorithm is used, the hop size between frames, and the post-processing cleanup applied.
Usage Tiers
Tier 1: Presets (80% of users)
val extractor = PitchDetection.createContourExtractor(
ContourExtractorConfig.SCORING,
modelProvider = { ModelLoader.loadSwiftF0() }
)Content copied to clipboard
Tier 2: Builder (15% of users)
val config = ContourExtractorConfig.Builder()
.preset(ContourExtractorConfig.SCORING)
.sampleRate(16000)
.hopMs(10)
.build()
val extractor = PitchDetection.createContourExtractor(config, modelProvider = { ... })Content copied to clipboard
Tier 3: .copy() (5% of users)
val config = ContourExtractorConfig.SCORING.copy(hopMs = 5)Content copied to clipboard
See also
Pitch Detection. create Contour Extractor
Factory that accepts this config
Pitch Contour Extractor
The extractor constructed from this config
The cleanup pipeline applied after extraction
Constructors
Link copied to clipboard
constructor(preset: PitchPreset = PitchPreset.BALANCED, algorithm: PitchAlgorithm = PitchAlgorithm.SWIFT_F0, sampleRate: Int = 16000, hopMs: Int = 10, cleanup: PitchProcessingConfig = PitchProcessingConfig.SCORING, voiceType: VoiceType = VoiceType.Auto, quietHandling: QuietHandling = QuietHandling.NORMAL, strictness: DetectionStrictness = DetectionStrictness.BALANCED)
Types
Properties
Link copied to clipboard
Pitch detection algorithm
Link copied to clipboard
Post-processing configuration
Link copied to clipboard
Detection preset for resolution/accuracy trade-off
Link copied to clipboard
How to handle quiet audio
Link copied to clipboard
Input audio sample rate in Hz
Link copied to clipboard
Detection strictness level