lIlBrother commited on
Commit
80b96fb
1 Parent(s): b854123

Update: 사용 example 수정

Browse files
Files changed (1) hide show
  1. README.md +7 -8
README.md CHANGED
@@ -41,6 +41,8 @@ Just using `load_metric("wer")` and `load_metric("wer")` in huggingface `dataset
41
 
42
  ## How to Get Started With the Model
43
  ```python
 
 
44
  from transformers import (
45
  AutoConfig,
46
  AutoFeatureExtractor,
@@ -49,16 +51,13 @@ from transformers import (
49
  Wav2Vec2ProcessorWithLM,
50
  )
51
  from transformers.pipelines import AutomaticSpeechRecognitionPipeline
52
- import librosa
 
53
 
54
  # 모델과 토크나이저, 예측을 위한 각 모듈들을 불러옵니다.
55
- config = AutoConfig.from_pretrained(model_config_path)
56
- model = AutoModelForCTC.from_pretrained(
57
- model_name_or_path,
58
- config=config,
59
- )
60
- feature_extractor = AutoFeatureExtractor.from_pretrained(model_name_or_path)
61
- tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
62
  beamsearch_decoder = build_ctcdecoder(
63
  labels=list(tokenizer.encoder.keys()),
64
  kenlm_model_path=None,
 
41
 
42
  ## How to Get Started With the Model
43
  ```python
44
+ import librosa
45
+ from pyctcdecode import build_ctcdecoder
46
  from transformers import (
47
  AutoConfig,
48
  AutoFeatureExtractor,
 
51
  Wav2Vec2ProcessorWithLM,
52
  )
53
  from transformers.pipelines import AutomaticSpeechRecognitionPipeline
54
+
55
+ audio_path = ""
56
 
57
  # 모델과 토크나이저, 예측을 위한 각 모듈들을 불러옵니다.
58
+ model = AutoModelForCTC.from_pretrained("42MARU/ko-42maru-wav2vec2-conformer-del-1s")
59
+ feature_extractor = AutoFeatureExtractor.from_pretrained("42MARU/ko-42maru-wav2vec2-conformer-del-1s")
60
+ tokenizer = AutoTokenizer.from_pretrained("42MARU/ko-42maru-wav2vec2-conformer-del-1s")
 
 
 
 
61
  beamsearch_decoder = build_ctcdecoder(
62
  labels=list(tokenizer.encoder.keys()),
63
  kenlm_model_path=None,