Accent Conversion Server SDK
Supported Accents
- South African
- Filipino
- Indian
- Latin American
Supported Platforms
- Linux (armv8a, x64)
Code Snippet
import krisp_audio
# initialize Krisp SDK global instance
krisp_audio.globalInit("")
# Create Noise Cleaner with the specified configuration
nc_cfg = krisp_audio.NcSessionConfig()
ncFloat = krisp_audio.NcFloat.create(nc_cfg)
# Noise Cleaner frame by frame processing of the given audio stream
for i in range(0, 1000) # frame count
processed_frame = ncFloat.process(frame, self.suppression_level)
# Free the Krisp SDK global instance
ncFloat = None
krisp_audio.globalDestroy()try
{
globalInit(L"");
ModelInfo ncModelInfo;
ncModelInfo.path = L"/path/to/the/ac-model.kef";
NcSessionConfig ncCfg =
{
inRate,
frameDurationMillis,
outRate,
&ncModelInfo,
false,
nullptr
};
std::shared_ptr<Nc<SamplingFormat>> ncSession = Nc<SamplingFormat>::create(ncCfg);
while(frameAvailable)
{
ncSession->process(inFrame, inFrameSize, outFrame, outFrameSize);
}
// ncSession should be released before globalDestroy()
ncSession.reset();
globalDestroy();
}
catch(std::exception& ex)
{
// Handle exception
}Updated about 2 hours ago
