Update README.md
Browse files
README.md
CHANGED
@@ -48,8 +48,7 @@ import torchaudio
|
|
48 |
ecapa2_model = torch.jit.load(model_file, map_location='cpu')
|
49 |
audio, sr = torchaudio.load('sample.wav') # sample rate of 16 kHz expected
|
50 |
|
51 |
-
|
52 |
-
embedding = ecapa2_model(audio)
|
53 |
```
|
54 |
|
55 |
For faster, 16-bit half-precision CUDA inference (recommended):
|
@@ -62,10 +61,11 @@ ecapa2_model = torch.jit.load(model_file, map_location='cuda')
|
|
62 |
ecapa2_model.half() # optional, but results in faster inference
|
63 |
audio, sr = torchaudio.load('sample.wav') # sample rate of 16 kHz expected
|
64 |
|
65 |
-
|
66 |
-
embedding = ecapa2_model(audio)
|
67 |
```
|
68 |
|
|
|
|
|
69 |
### Hierarchical Feature Extraction
|
70 |
|
71 |
For the extraction of other hierachical features, the `label` argument can be used, which accepts a string containing the feature ids separated with '|':
|
|
|
48 |
ecapa2_model = torch.jit.load(model_file, map_location='cpu')
|
49 |
audio, sr = torchaudio.load('sample.wav') # sample rate of 16 kHz expected
|
50 |
|
51 |
+
embedding = ecapa2_model(audio)
|
|
|
52 |
```
|
53 |
|
54 |
For faster, 16-bit half-precision CUDA inference (recommended):
|
|
|
61 |
ecapa2_model.half() # optional, but results in faster inference
|
62 |
audio, sr = torchaudio.load('sample.wav') # sample rate of 16 kHz expected
|
63 |
|
64 |
+
embedding = ecapa2_model(audio)
|
|
|
65 |
```
|
66 |
|
67 |
+
There is no need for explicitly setting `eval` model and disabling gradient calculations. This is done automatically.
|
68 |
+
|
69 |
### Hierarchical Feature Extraction
|
70 |
|
71 |
For the extraction of other hierachical features, the `label` argument can be used, which accepts a string containing the feature ids separated with '|':
|