tokenizeR
Browse files
asr.py
CHANGED
@@ -131,7 +131,7 @@ def transcribe(model, audio_data=None, lang="eng (English)", user_transcription=
|
|
131 |
|
132 |
def fine_tune_model(model, processor, user_transcription, audio_samples, lang_code):
|
133 |
# Convert the user-provided transcription to a tensor
|
134 |
-
transcription_tensor = processor.
|
135 |
|
136 |
# Create a new dataset with the user-provided transcription and audio samples
|
137 |
dataset = [(audio_samples, transcription_tensor)]
|
|
|
131 |
|
132 |
def fine_tune_model(model, processor, user_transcription, audio_samples, lang_code):
|
133 |
# Convert the user-provided transcription to a tensor
|
134 |
+
transcription_tensor = processor.tokenizer(user_transcription, return_tensors="pt")
|
135 |
|
136 |
# Create a new dataset with the user-provided transcription and audio samples
|
137 |
dataset = [(audio_samples, transcription_tensor)]
|