Spaces:
Runtime error
Runtime error
Make soundfile optional
Browse filesHuggingFace Spaces doesn't have it installed
- fbeeper_hubert.py +5 -1
fbeeper_hubert.py
CHANGED
@@ -4,11 +4,15 @@
|
|
4 |
import argparse
|
5 |
import re
|
6 |
import logging
|
|
|
7 |
|
8 |
-
import soundfile
|
9 |
import transformers
|
10 |
import torch
|
11 |
import numpy as np
|
|
|
|
|
|
|
|
|
12 |
|
13 |
|
14 |
log = logging.getLogger(__name__)
|
|
|
4 |
import argparse
|
5 |
import re
|
6 |
import logging
|
7 |
+
import warnings
|
8 |
|
|
|
9 |
import transformers
|
10 |
import torch
|
11 |
import numpy as np
|
12 |
+
try:
|
13 |
+
import soundfile
|
14 |
+
except ImportError:
|
15 |
+
warnings.warn("Cannot import soundfile. Reading/writing files will be unavailable")
|
16 |
|
17 |
|
18 |
log = logging.getLogger(__name__)
|