".github/vscode:/vscode.git/clone" did not exist on "887a3d989b5caa2da89dab45c9d75421e148c23d"
README.md 1022 Bytes
Newer Older
flyingdown's avatar
flyingdown committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Libtorchaudio Examples

* [Augmentation](./augmentation)
* [Speech Recognition with wav2vec2.0](./speech_recognition)

## Build

The example applications in this directory depend on `libtorch` and `libtorchaudio`.
If you have a working `PyTorch`, you already have `libtorch`.
Please refer to [this tutorial](https://pytorch.org/tutorials/advanced/torch_script_custom_classes.html) for the use of `libtorch` and TorchScript.

`libtorchaudio` is the library of torchaudio's C++ components without Python component.
It is currently not distributed, and it will be built alongside with the applications.

The following commands will build `libtorchaudio` and applications.

```bash
git submodule update
mkdir build
cd build
cmake -GNinja \
      -DCMAKE_PREFIX_PATH="$(python -c 'import torch;print(torch.utils.cmake_prefix_path)')" \
      -DBUILD_SOX=ON \
      -DBUILD_KALDI=OFF \
      -DBUILD_RNNT=ON \
      ..
cmake --build .
```

For the usages of each application, refer to the corresponding application directory.