mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-18 22:02:22 +00:00
35 lines
990 B
C++
35 lines
990 B
C++
// kaldifeat/python/csrc/utils.h
|
|
//
|
|
// Copyright (c) 2021 Xiaomi Corporation (authors: Fangjun Kuang)
|
|
|
|
#ifndef KALDIFEAT_PYTHON_CSRC_UTILS_H_
|
|
#define KALDIFEAT_PYTHON_CSRC_UTILS_H_
|
|
|
|
#include "kaldifeat/csrc/feature-window.h"
|
|
#include "kaldifeat/csrc/mel-computations.h"
|
|
#include "kaldifeat/python/csrc/kaldifeat.h"
|
|
|
|
/*
|
|
* This file contains code about `from_dict` and
|
|
* `to_dict` for various options in kaldifeat.
|
|
*
|
|
* Regarding `from_dict`, users don't need to provide
|
|
* all the fields in the options. If some fields
|
|
* are not provided, it just uses the default one.
|
|
*
|
|
* If the provided dict in `from_dict` is empty,
|
|
* all fields use their default values.
|
|
*/
|
|
|
|
namespace kaldifeat {
|
|
|
|
FrameExtractionOptions FrameExtractionOptionsFromDict(py::dict dict);
|
|
py::dict AsDict(const FrameExtractionOptions &opts);
|
|
|
|
MelBanksOptions MelBanksOptionsFromDict(py::dict dict);
|
|
py::dict AsDict(const MelBanksOptions &opts);
|
|
|
|
} // namespace kaldifeat
|
|
|
|
#endif // KALDIFEAT_PYTHON_CSRC_UTILS_H_
|