align symbol naming on omnivoice convention
This commit is contained in:
@@ -39,10 +39,10 @@
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#define QWEN_TOKENIZER_HOP_LENGTH 1920
|
||||
#define QWEN_TOKENIZER_SAMPLE_RATE 24000
|
||||
#define QWEN_TOKENIZER_NUM_CODEBOOKS 16
|
||||
#define QWEN_TOKENIZER_CODE_BITS 11
|
||||
#define TOKENIZER_HOP_LENGTH 1920
|
||||
#define TOKENIZER_SAMPLE_RATE 24000
|
||||
#define TOKENIZER_NUM_CODEBOOKS 16
|
||||
#define TOKENIZER_CODE_BITS 11
|
||||
|
||||
struct PipelineCodec {
|
||||
GGUFModel gguf;
|
||||
@@ -82,18 +82,18 @@ bool pipeline_codec_load(PipelineCodec * pc, const char * gguf_path, BackendPair
|
||||
|
||||
// Decode RVQ codes into a 24 kHz mono waveform.
|
||||
// codes: flat int32 buffer, [K, T] row-major (T fastest).
|
||||
// Returns audio of length T * QWEN_TOKENIZER_HOP_LENGTH, empty on failure.
|
||||
// Returns audio of length T * TOKENIZER_HOP_LENGTH, empty on failure.
|
||||
std::vector<float> pipeline_codec_decode(PipelineCodec * pc, const int32_t * codes, int K, int T);
|
||||
|
||||
// Encode a 24 kHz mono waveform into RVQ codes.
|
||||
// audio : [n_samples] f32 mono 24 kHz. Must be a multiple of
|
||||
// QWEN_TOKENIZER_HOP_LENGTH (1920); the caller is expected
|
||||
// TOKENIZER_HOP_LENGTH (1920); the caller is expected
|
||||
// to pad with zeros if needed.
|
||||
// dump_dir: optional path. When non NULL, dumps the SEANet, encoder
|
||||
// transformer and post-downsample (pre-FSQ latents) buffers
|
||||
// into seanet-out.bin, enc-transformer-out.bin and
|
||||
// codec-pre-fsq.bin under that directory. Quiet otherwise.
|
||||
// Returns codes flat as [K, T] row-major, K = QWEN_TOKENIZER_NUM_CODEBOOKS,
|
||||
// Returns codes flat as [K, T] row-major, K = TOKENIZER_NUM_CODEBOOKS,
|
||||
// T = n_samples / 1920. Empty on failure.
|
||||
std::vector<int32_t> pipeline_codec_encode(PipelineCodec * pc,
|
||||
const float * audio,
|
||||
|
||||
Reference in New Issue
Block a user