Nithya commited on
Commit
d607f42
1 Parent(s): 8505dc9

added examples

Browse files
.gitattributes CHANGED
@@ -4,3 +4,4 @@ models/diffusion_pitch/last.ckpt filter=lfs diff=lfs merge=lfs -text
4
  models/pitch_to_audio/last.ckpt filter=lfs diff=lfs merge=lfs -text
5
  models/diffusion_pitch/qt.joblib filter=lfs diff=lfs merge=lfs -text
6
  models/pitch_to_audio/qt.joblib filter=lfs diff=lfs merge=lfs -text
 
 
4
  models/pitch_to_audio/last.ckpt filter=lfs diff=lfs merge=lfs -text
5
  models/diffusion_pitch/qt.joblib filter=lfs diff=lfs merge=lfs -text
6
  models/pitch_to_audio/qt.joblib filter=lfs diff=lfs merge=lfs -text
7
+ examples/** filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -195,14 +195,46 @@ def set_guide_and_generate(audio):
195
  return audio, user_input_plot, pitch
196
 
197
  with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  with gr.Row():
199
  with gr.Column():
200
  audio = gr.Audio(label="Input")
201
  sbmt = gr.Button()
202
- user_input = gr.Plot(label="User Input")
 
203
  with gr.Column():
204
  generated_audio = gr.Audio(label="Generated Audio")
205
- generated_pitch = gr.Plot(label="Generated Pitch")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  sbmt.click(set_guide_and_generate, inputs=[audio], outputs=[generated_audio, user_input, generated_pitch])
207
 
208
  def main(argv):
 
195
  return audio, user_input_plot, pitch
196
 
197
  with gr.Blocks() as demo:
198
+ with gr.Column():
199
+ gr.Markdown("""
200
+ # GaMaDHaNi: HIERARCHICAL GENERATIVE MODELING OF MELODIC VOCAL CONTOURS IN HINDUSTANI CLASSICAL MUSIC
201
+ :book: Read more about the project [here](https://arxiv.org/pdf/2408.12658) <br>
202
+ :samples: Listen to the samples [here](https://snnithya.github.io/gamadhani-samples) <br>
203
+ # """)
204
+ gr.Markdown("""
205
+ ## Instructions
206
+ In this demo you can interact with the model in two ways:
207
+ 1. **Call and response**: The model will try to continue the idea that you input. This is similar to `primed generation' discussed in the paper.
208
+ 2. **Melodic reinterpretation**: Akin to the idea of `coarse pitch conditioning' presented in the paper, you can input a pitch contour and the model will generate audio that is similar to but not exactly the same. <br><br>
209
+ **Upload an audio file or record your voice to get started!**
210
+ """)
211
+ gr.Markdown("""
212
+ This is still a work in progress, so please feel free to share any weird or interesting examples, we would love to hear them! Contact us at [snnithya.mit.edu](mailto:snnithya.mit.edu).
213
+ """)
214
+
215
  with gr.Row():
216
  with gr.Column():
217
  audio = gr.Audio(label="Input")
218
  sbmt = gr.Button()
219
+ with gr.Accordion("View Pitch Plot"):
220
+ user_input = gr.Plot(label="User Input")
221
  with gr.Column():
222
  generated_audio = gr.Audio(label="Generated Audio")
223
+ with gr.Accordion("View Pitch Plot"):
224
+ generated_pitch = gr.Plot(label="Generated Pitch")
225
+ example_description = gr.Textbox(label="Example Description", interactive=False)
226
+ examples = gr.Examples(
227
+ examples=[
228
+ ["examples/ex1.wav"],
229
+ ["examples/ex2.wav"],
230
+ ["examples/ex3.wav"],
231
+ ["examples/ex4.wav"],
232
+ ["examples/ex5.wav"]
233
+ # Add more examples as needed
234
+ ],
235
+ inputs=audio
236
+ )
237
+
238
  sbmt.click(set_guide_and_generate, inputs=[audio], outputs=[generated_audio, user_input, generated_pitch])
239
 
240
  def main(argv):
examples/ex1-hf.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30ae54c7e54036729d69fe70bfb294d1b80e445ad917df40bb293dfd88e7b21a
3
+ size 307406
examples/ex2-hf.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9705358da218e84a8879b31ff30ee4a692706b6a5b6f76a9fdb21075300e3e43
3
+ size 265080
examples/ex3-hf.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e816747fc71742ac1a4897ff7eebc3a7214c5d23a3c1b291f6d96e0630b82a9d
3
+ size 159868
examples/ex4-hf.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0178c8ca78f6ae4bcd312f3f5c005dabfd1cb1f1520802872a4cd0507fa5878d
3
+ size 291182
examples/ex5-hf.wav ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e65935858bd0f9a8665d90929d69b8f2fcd6a5f52f079f41542c57426c8b4ace
3
+ size 128950