kmknair commited on
Commit
dec6760
1 Parent(s): 2904d5d

added examples and labels

Browse files
app.py CHANGED
@@ -59,38 +59,41 @@ def transcribe_en_stream(audio, state=""):
59
  ta_tr_stream_tab = gr.Interface(
60
  fn=transcribe_ta_stream,
61
  inputs=[
62
- gr.Audio(source="microphone", type="filepath", streaming=True),
63
  "state"
64
  ],
65
  outputs=[
66
  "textbox",
67
  "state"
68
  ],
 
69
  live=True)
70
  # transcribe Arabic stream
71
  ar_tr_stream_tab = gr.Interface(
72
  fn=transcribe_ar_stream,
73
  inputs=[
74
- gr.Audio(source="microphone", type="filepath", streaming=True),
75
  "state"
76
  ],
77
  outputs=[
78
  "textbox",
79
  "state"
80
  ],
 
81
  live=True)
82
 
83
  # transcribe English stream
84
  en_tr_stream_tab = gr.Interface(
85
  fn=transcribe_en_stream,
86
  inputs=[
87
- gr.Audio(source="microphone", type="filepath", streaming=True),
88
  "state"
89
  ],
90
  outputs=[
91
  "textbox",
92
  "state"
93
  ],
 
94
  live=True)
95
 
96
 
@@ -98,27 +101,33 @@ en_tr_stream_tab = gr.Interface(
98
  ta_tr_file_tab = gr.Interface(
99
  fn=transcribe_ta,
100
  inputs=[
101
- gr.Audio(type="filepath"),
102
- gr.Audio(source="microphone", type="filepath")
103
  ],
 
 
104
  outputs="text")
105
 
106
  # transcribe Arabic file
107
  ar_tr_file_tab = gr.Interface(
108
  fn=transcribe_ar,
109
  inputs=[
110
- gr.Audio(type="filepath"),
111
- gr.Audio(source="microphone", type="filepath")
112
  ],
 
 
113
  outputs="text")
114
 
115
  # transcribe English file
116
  en_tr_file_tab = gr.Interface(
117
  fn=transcribe_en,
118
  inputs=[
119
- gr.Audio(type="filepath"),
120
- gr.Audio(source="microphone", type="filepath")
121
  ],
 
 
122
  outputs="text")
123
 
124
 
 
59
  ta_tr_stream_tab = gr.Interface(
60
  fn=transcribe_ta_stream,
61
  inputs=[
62
+ gr.Audio(source="microphone", type="filepath", streaming=True, label="தமிழ் பேச்சு"),
63
  "state"
64
  ],
65
  outputs=[
66
  "textbox",
67
  "state"
68
  ],
69
+ description="ரெகாட் பட்ட்ண் அமர்தி பேசவும், பேச்சு சொல் வரி பகிர்ப்பு வலது பக்கதில் அச்சிடபடும்",
70
  live=True)
71
  # transcribe Arabic stream
72
  ar_tr_stream_tab = gr.Interface(
73
  fn=transcribe_ar_stream,
74
  inputs=[
75
+ gr.Audio(source="microphone", type="filepath", streaming=True, label="Arabic speech"),
76
  "state"
77
  ],
78
  outputs=[
79
  "textbox",
80
  "state"
81
  ],
82
+ description="Click record from microphone and start talking, transcription shall appear to the right.",
83
  live=True)
84
 
85
  # transcribe English stream
86
  en_tr_stream_tab = gr.Interface(
87
  fn=transcribe_en_stream,
88
  inputs=[
89
+ gr.Audio(source="microphone", type="filepath", streaming=True, label="English speech"),
90
  "state"
91
  ],
92
  outputs=[
93
  "textbox",
94
  "state"
95
  ],
96
+ description="Click record from microphone and start talking, transcription shall appear to the right.",
97
  live=True)
98
 
99
 
 
101
  ta_tr_file_tab = gr.Interface(
102
  fn=transcribe_ta,
103
  inputs=[
104
+ gr.Audio(type="filepath", label="தமிழ் ஒலி நூல்"),
105
+ gr.Audio(source="microphone", type="filepath", label= "தமிழ் பேச்சு")
106
  ],
107
+ examples=[["samples/ta/32862591.mp3", None], ["samples/ta/32862612.mp3", None]],
108
+ description="ஒலி பகிர்ப்பு நூலை சமர்ப்பிக்கவும், அல்லது ரெகாட் பட்ட்ண் அமர்தி பேசவும், பேச்சு சொல் வரி பகிர்ப்பு வலது பக்கதில் அச்சிடபடும்",
109
  outputs="text")
110
 
111
  # transcribe Arabic file
112
  ar_tr_file_tab = gr.Interface(
113
  fn=transcribe_ar,
114
  inputs=[
115
+ gr.Audio(type="filepath", label="Arabic file upload"),
116
+ gr.Audio(source="microphone", type="filepath", label="Arabic speech")
117
  ],
118
+ examples=[["samples/ar/19706399.mp3", None],["samples/ar/19985784.mp3", None]],
119
+ description="Upload a file or, click record from microphone and start talking, transcription shall appear to the right.",
120
  outputs="text")
121
 
122
  # transcribe English file
123
  en_tr_file_tab = gr.Interface(
124
  fn=transcribe_en,
125
  inputs=[
126
+ gr.Audio(type="filepath", label="English file upload"),
127
+ gr.Audio(source="microphone", type="filepath", label="English speech")
128
  ],
129
+ examples=[["samples/en/32941920.mp3", None], ["samples/en/32941921.mp3", None]],
130
+ description="Upload a file or, click record from microphone and start talking, transcription shall appear to the right.",
131
  outputs="text")
132
 
133
 
samples/ar/19706399.mp3 ADDED
Binary file (39.6 kB). View file
 
samples/ar/19985784.mp3 ADDED
Binary file (46.7 kB). View file
 
samples/en/32941920.mp3 ADDED
Binary file (40.7 kB). View file
 
samples/en/32941921.mp3 ADDED
Binary file (19.1 kB). View file
 
samples/ta/32862591.mp3 ADDED
Binary file (57.5 kB). View file
 
samples/ta/32862612.mp3 ADDED
Binary file (42.4 kB). View file