spaco67 commited on
Commit
949f096
1 Parent(s): eb85254

create handler.py

Browse files
Files changed (1) hide show
  1. handler.py +13 -0
handler.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from transformers import pipeline
3
+
4
+ os.environ["WANDB_DISABLE"] = "true"
5
+
6
+ model_name = "jummai-hausa-tts"
7
+ tts_pipeline = pipeline("text-to-speech", model=model_name)
8
+
9
+ def transcribe(text):
10
+ return tts_pipeline(text).input_values[0]
11
+
12
+ if __name__ == "__main__":
13
+ print(transcribe("Sannu da zuwa"))