juancopi81 commited on
Commit
e80023d
1 Parent(s): 2a91262

Add libfluidsynth1 for better sound

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. packages.txt +1 -0
  3. requirements.txt +2 -1
app.py CHANGED
@@ -61,7 +61,7 @@ def generate_guitar_piece(time_signature: str,
61
 
62
  # Convert text of notes to audio
63
  note_sequence = token_sequence_to_note_sequence(piece)
64
- synth = note_seq.midi_synth.synthesize
65
  array_of_floats = synth(note_sequence, sample_rate=SAMPLE_RATE)
66
  int16_data = note_seq.audio_io.float_samples_to_int16(array_of_floats)
67
  piano_roll = create_image_from_note_sequence(note_sequence)
 
61
 
62
  # Convert text of notes to audio
63
  note_sequence = token_sequence_to_note_sequence(piece)
64
+ synth = note_seq.midi_synth.fluidsynth
65
  array_of_floats = synth(note_sequence, sample_rate=SAMPLE_RATE)
66
  int16_data = note_seq.audio_io.float_samples_to_int16(array_of_floats)
67
  piano_roll = create_image_from_note_sequence(note_sequence)
packages.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ libfluidsynth1
requirements.txt CHANGED
@@ -2,4 +2,5 @@ transformers
2
  TensorFlow==2.8.2
3
  note-seq
4
  pandas
5
- matplotlib
 
 
2
  TensorFlow==2.8.2
3
  note-seq
4
  pandas
5
+ matplotlib
6
+ pyfluidsynth==1.3.0