Automatic Speech Recognition
Transformers
PyTorch
TensorBoard
Chinese
whisper
whisper-event
Generated from Trainer
Eval Results (legacy)
Instructions to use thomas0104/whisper_medium_nan_tw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thomas0104/whisper_medium_nan_tw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="thomas0104/whisper_medium_nan_tw")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("thomas0104/whisper_medium_nan_tw") model = AutoModelForSpeechSeq2Seq.from_pretrained("thomas0104/whisper_medium_nan_tw") - Notebooks
- Google Colab
- Kaggle
修正NormText中文部分
Browse files- ryNormText.py +3 -3
ryNormText.py
CHANGED
|
@@ -26,7 +26,7 @@ def ryNormText(s):
|
|
| 26 |
|
| 27 |
punc1= string.punctuation # 這是為英文
|
| 28 |
punc1
|
| 29 |
-
punc2= '
|
| 30 |
|
| 31 |
punc= f"[{punc1}{punc2}]" ## 這是 regular expression 的 pattern
|
| 32 |
|
|
@@ -56,7 +56,7 @@ import unicodedata
|
|
| 56 |
import re
|
| 57 |
|
| 58 |
|
| 59 |
-
def separ_char_word(inputString= '
|
| 60 |
|
| 61 |
inputString= 把怪字修進unicode(inputString)
|
| 62 |
|
|
@@ -76,6 +76,6 @@ def separ_char_word(inputString= '我是呂仁園 Renyuan Lyu'):
|
|
| 76 |
y= re.sub('[ ]+',' ', y) #連續空白只保留1個空白
|
| 77 |
return y
|
| 78 |
|
| 79 |
-
#q= 中英分開('大家好 da jia hao
|
| 80 |
|
| 81 |
#print(q)
|
|
|
|
| 26 |
|
| 27 |
punc1= string.punctuation # 這是為英文
|
| 28 |
punc1
|
| 29 |
+
punc2= '"#$%&'()*+,-/:;<=>@[\]^_`{|}~⦅⦆「」、、〃《》「」『』【】〔〕〖〗〘〙〚〛〜〝〞〟〰〾〿–—‘’‛“”„‟…‧﹏·〈〉-。﹐、!?,\n' # 這是為中文,尚未完備!!
|
| 30 |
|
| 31 |
punc= f"[{punc1}{punc2}]" ## 這是 regular expression 的 pattern
|
| 32 |
|
|
|
|
| 56 |
import re
|
| 57 |
|
| 58 |
|
| 59 |
+
def separ_char_word(inputString= ''):
|
| 60 |
|
| 61 |
inputString= 把怪字修進unicode(inputString)
|
| 62 |
|
|
|
|
| 76 |
y= re.sub('[ ]+',' ', y) #連續空白只保留1個空白
|
| 77 |
return y
|
| 78 |
|
| 79 |
+
#q= 中英分開('大家好 da jia hao')
|
| 80 |
|
| 81 |
#print(q)
|