"vscode:/vscode.git/clone" did not exist on "1fd7aaaf8b59c4fac648c08c6efe788e4c7dd37d"
README.md 998 Bytes
Newer Older
moto's avatar
moto committed
1
# Libtorchaudio Examples
moto's avatar
moto committed
2

moto's avatar
moto committed
3
* [Augmentation](./augmentation)
4
* [Speech Recognition with wav2vec2.0](./speech_recognition)
moto's avatar
moto committed
5

moto's avatar
moto committed
6
## Build
moto's avatar
moto committed
7

moto's avatar
moto committed
8
9
10
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.
moto's avatar
moto committed
11

moto's avatar
moto committed
12
13
14
15
16
17
`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
18
git submodule update
moto's avatar
moto committed
19
20
21
22
23
24
25
26
27
28
29
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 \
      ..
cmake --build .
```

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