"vscode:/vscode.git/clone" did not exist on "92e2d74fd0426afb98621465d6574ad2a823e842"
README.md 916 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)
moto's avatar
moto committed
4

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

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

moto's avatar
moto committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
`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
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.