Upload processor
Browse files- processing_meralion2.py +2 -1
- processor_config.json +1 -0
processing_meralion2.py
CHANGED
|
@@ -50,8 +50,9 @@ class MERaLiON2Processor(ProcessorMixin):
|
|
| 50 |
):
|
| 51 |
self.fixed_speech_embeds_length = fixed_speech_embeds_length
|
| 52 |
self.speech_token_index = speech_token_index
|
|
|
|
| 53 |
self.whisper_chunk_size = whisper_chunk_size
|
| 54 |
-
self.number_chunk_limit = time_duration_limit // whisper_chunk_size
|
| 55 |
self.do_normalize = do_normalize
|
| 56 |
|
| 57 |
super().__init__(feature_extractor, tokenizer)
|
|
|
|
| 50 |
):
|
| 51 |
self.fixed_speech_embeds_length = fixed_speech_embeds_length
|
| 52 |
self.speech_token_index = speech_token_index
|
| 53 |
+
self.time_duration_limit = time_duration_limit
|
| 54 |
self.whisper_chunk_size = whisper_chunk_size
|
| 55 |
+
self.number_chunk_limit = self.time_duration_limit // self.whisper_chunk_size
|
| 56 |
self.do_normalize = do_normalize
|
| 57 |
|
| 58 |
super().__init__(feature_extractor, tokenizer)
|
processor_config.json
CHANGED
|
@@ -6,5 +6,6 @@
|
|
| 6 |
"fixed_speech_embeds_length": 100,
|
| 7 |
"processor_class": "MERaLiON2Processor",
|
| 8 |
"speech_token_index": 255999,
|
|
|
|
| 9 |
"whisper_chunk_size": 30
|
| 10 |
}
|
|
|
|
| 6 |
"fixed_speech_embeds_length": 100,
|
| 7 |
"processor_class": "MERaLiON2Processor",
|
| 8 |
"speech_token_index": 255999,
|
| 9 |
+
"time_duration_limit": 300,
|
| 10 |
"whisper_chunk_size": 30
|
| 11 |
}
|