Ali Sartaz Khan commited on
Commit
96905d6
·
1 Parent(s): 0feb9f7
Files changed (1) hide show
  1. talk_arena/audio_collection.py +4 -4
talk_arena/audio_collection.py CHANGED
@@ -18,7 +18,7 @@ os.makedirs("outputs", exist_ok=True)
18
  # Initialize Hugging Face API client
19
  hf_api = HfApi(token=os.getenv("HF_TOKEN"))
20
  DATASET_REPO = "alisartazkhan/audioLLM_judge"
21
- CATEGORY = "pilot_tempo_control4"
22
  MAX_RECORDINGS = 5 # Number of prompts to record
23
  COMPLETION_CODE = "CEO4RWQ6"
24
  resampler = Audio(sampling_rate=16_000)
@@ -103,7 +103,7 @@ def on_submit(audio_input, prompt_index):
103
  if audio_input is None:
104
  return (
105
  gr.Markdown(f"# Recording {prompt_index + 1}/{MAX_RECORDINGS}"),
106
- gr.Markdown(f"## Please read out the following sentence:"),
107
  gr.Markdown(f"### \"{PROMPTS[prompt_index]}\""),
108
  gr.Audio(value=None, label="Record your response"),
109
  gr.Button("Submit Recording", interactive=False),
@@ -165,7 +165,7 @@ def next_prompt(prompt_index):
165
  # Display the next prompt
166
  return (
167
  gr.Markdown(f"# Recording {prompt_index + 1}/{MAX_RECORDINGS}"),
168
- gr.Markdown(f"## Please read out the following sentence:"),
169
  gr.Markdown(f"### \"{PROMPTS[prompt_index]}\""),
170
  gr.Audio(value=None, label="Record your response", sources=["microphone"]),
171
  gr.Button("Submit Recording", interactive=False),
@@ -202,7 +202,7 @@ with gr.Blocks(theme=theme, css="footer {visibility: hidden}") as demo:
202
  prompt_index = gr.State(0)
203
 
204
  title = gr.Markdown(f"# Recording 1/{MAX_RECORDINGS}")
205
- instructions = gr.Markdown("## Please read out the following sentence:")
206
  prompt_text = gr.Markdown(f"### \"{PROMPTS[0]}\"")
207
 
208
  audio_input = gr.Audio(
 
18
  # Initialize Hugging Face API client
19
  hf_api = HfApi(token=os.getenv("HF_TOKEN"))
20
  DATASET_REPO = "alisartazkhan/audioLLM_judge"
21
+ CATEGORY = "pilot_tempo_control5"
22
  MAX_RECORDINGS = 5 # Number of prompts to record
23
  COMPLETION_CODE = "CEO4RWQ6"
24
  resampler = Audio(sampling_rate=16_000)
 
103
  if audio_input is None:
104
  return (
105
  gr.Markdown(f"# Recording {prompt_index + 1}/{MAX_RECORDINGS}"),
106
+ gr.Markdown(f"## Please record yourself reading the following sentence:"),
107
  gr.Markdown(f"### \"{PROMPTS[prompt_index]}\""),
108
  gr.Audio(value=None, label="Record your response"),
109
  gr.Button("Submit Recording", interactive=False),
 
165
  # Display the next prompt
166
  return (
167
  gr.Markdown(f"# Recording {prompt_index + 1}/{MAX_RECORDINGS}"),
168
+ gr.Markdown(f"## Please record yourself reading the following sentence:"),
169
  gr.Markdown(f"### \"{PROMPTS[prompt_index]}\""),
170
  gr.Audio(value=None, label="Record your response", sources=["microphone"]),
171
  gr.Button("Submit Recording", interactive=False),
 
202
  prompt_index = gr.State(0)
203
 
204
  title = gr.Markdown(f"# Recording 1/{MAX_RECORDINGS}")
205
+ instructions = gr.Markdown("## Please record yourself reading the following sentence:")
206
  prompt_text = gr.Markdown(f"### \"{PROMPTS[0]}\"")
207
 
208
  audio_input = gr.Audio(