Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Fangjun Kuang csukuangfj

I may be slow to respond.
  • Xiaomi Corporation
  • Peking
View GitHub Profile
#!/usr/bin/env python3
# Copyright (c) 2021 Xiaomi Corporation (authors: Fangjun Kuang)
from import build_ctc_topo2
from speechbrain.pretrained import EncoderDecoderASR
import k2
import torch

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](

csukuangfj /
Created Apr 22, 2019
create wav file using c++
// author: fangjun kuang <csukuangfj at gmail dot com>
// date: Apr. 22, 2019
// refer to
#include <fstream>
#include <iostream>
typedef struct WAV_HEADER {
/* RIFF Chunk Descriptor */
View RNN-notes
- a blog article
csukuangfj /
Last active Mar 7, 2019
useful tensorflow statements
import tensorflow as tf
csukuangfj /
Last active Feb 28, 2019



  • protobuf for python