#pragma once #include "time/BoundedTimeline.h" #include "core/Phone.h" #include "audio/AudioClip.h" #include "tools/progress.h" #include extern "C" { #include } typedef std::function( boost::optional dialog )> decoderFactory; typedef std::function( const AudioClip& audioClip, TimeRange utteranceTimeRange, ps_decoder_t& decoder, ProgressSink& utteranceProgressSink )> utteranceToPhonesFunction; BoundedTimeline recognizePhones( const AudioClip& inputAudioClip, boost::optional dialog, decoderFactory createDecoder, utteranceToPhonesFunction utteranceToPhones, int maxThreadCount, ProgressSink& progressSink ); constexpr int sphinxSampleRate = 16000; const std::filesystem::path& getSphinxModelDirectory(); JoiningTimeline getNoiseSounds(TimeRange utteranceTimeRange, const Timeline& phones); BoundedTimeline recognizeWords( const std::vector& audioBuffer, ps_decoder_t& decoder );