from pretrained on tokenizer
Browse files
run_speech_recognition_ctc.py
CHANGED
@@ -522,10 +522,11 @@ def main():
|
|
522 |
# one local process can concurrently download model & vocab.
|
523 |
|
524 |
# load feature_extractor and tokenizer
|
525 |
-
tokenizer = Wav2Vec2CTCTokenizer(
|
526 |
-
|
527 |
-
|
528 |
-
|
|
|
529 |
feature_extractor = AutoFeatureExtractor.from_pretrained(
|
530 |
model_args.model_name_or_path, cache_dir=model_args.cache_dir, use_auth_token=data_args.use_auth_token
|
531 |
)
|
|
|
522 |
# one local process can concurrently download model & vocab.
|
523 |
|
524 |
# load feature_extractor and tokenizer
|
525 |
+
tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(
|
526 |
+
tokenizer_name_or_path,
|
527 |
+
use_auth_token=data_args.use_auth_token,
|
528 |
+
**tokenizer_kwargs,
|
529 |
+
)
|
530 |
feature_extractor = AutoFeatureExtractor.from_pretrained(
|
531 |
model_args.model_name_or_path, cache_dir=model_args.cache_dir, use_auth_token=data_args.use_auth_token
|
532 |
)
|