But there's a wrinkle. There may not be a way to save to .wav file.
PCIXQTNS34K6V672C7RFI6FM5KLPZKGDDI56TR35WCZMVUMPI2MQC record = function(word_idx)if Recording_device thenWords[word_idx].recording = Recording_device:getData()Recording_device:stop()Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"Recording_word":138,"record":156,"draw_teach_word":68,"on_play":96,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"draw_learn_screen":4,"on.draw":5,"fw_parent":155,"Words":12,"fw_app":"spell-cards","on.initialize":7,"on":1,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"draw_playing_button":130,"learn_text_input":60,"learn_key_release":61,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":53,"draw_teach_screen":110,"on.key_release":55,"teach_text_input":49,"on.text_input":54,"Recording_device":132,"Playing_source":126,"draw_recording_button":133,"on_record":95,"on_new_word_button":118,"Cursor_word":24,"new_word":64,"draw_new_word_button":117,"play":155,"on_word":80,"Mode":2,"learn_keychord_press":59}
play = function(word_idx)if Words[word_idx].recording thenPlaying_source = love.audio.newSource(Words[word_idx].recording)elsePlaying_source = love.audio.newSource('sample.wav', 'static')endPlaying_source:play()Recording_device = nilend
{"to_word_idx":94,"Recording_word":138,"record":153,"draw_teach_word":68,"on_play":96,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"draw_learn_screen":4,"on.draw":5,"fw_parent":153,"Words":12,"fw_app":"spell-cards","on.initialize":7,"on":1,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"draw_playing_button":130,"learn_text_input":60,"learn_key_release":61,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":53,"draw_teach_screen":110,"on.key_release":55,"teach_text_input":49,"on.text_input":54,"Recording_device":132,"Playing_source":126,"draw_recording_button":133,"on_record":95,"on_new_word_button":118,"Cursor_word":24,"new_word":64,"draw_new_word_button":117,"play":155,"on_word":80,"Mode":2,"learn_keychord_press":59}
play = function(word_idx)cording)if Words[word_idx].recording thenPlaying_source = love.audio.newSource(Words[word_idx].recording)elsePlaying_source = love.audio.newSource('sample.wav', 'static')endPlaying_source:play()Recording_device = nilend
{"to_word_idx":94,"Recording_word":138,"record":153,"draw_teach_word":68,"on_play":96,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"draw_learn_screen":4,"on.draw":5,"fw_parent":153,"Words":12,"fw_app":"spell-cards","on.initialize":7,"on":1,"Font_height":8,"learn_mouse_press":57,"Line_height":9,"learn_mouse_release":58,"draw_playing_button":130,"learn_text_input":60,"learn_key_release":61,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"draw_play_button":141,"on.keychord_press":53,"draw_teach_screen":110,"on.key_release":55,"teach_text_input":49,"on.text_input":54,"Recording_device":132,"Playing_source":126,"draw_recording_button":133,"on_record":95,"on_new_word_button":118,"Cursor_word":24,"new_word":64,"draw_new_word_button":117,"play":154,"on_word":80,"Mode":2,"learn_keychord_press":59}
record = function(word_idx)if Recording_device thenprint('save recording')Words[word_idx].recording = Recording_device:getData()Recording_device:stop()Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":153,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":148,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":152,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
record = function(word_idx)if Recording_device thenWords[word_idx].recording = Recording_device:getData()Recording_device:stop()Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":152,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":148,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":151,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
record = function(word_idx)if Recording_device thenRecording_device:stop()Words[word_idx].recording = Recording_device:getData()Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":151,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":148,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":150,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
record = function(word_idx)if Recording_device thenprint('saving to word', word_idx, Recording_device:getData())Recording_device:stop()print('saving to word 2', word_idx, Recording_device:getData())Words[word_idx].recording = Recording_device:getData()print(Words[word_idx].recording)Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":150,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":148,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":149,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
record = function(word_idx)if Recording_device thenRecording_device:stop()print('saving to word', word_idx)Words[word_idx].recording = Recording_device:getData()print(Words[word_idx].recording)Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":149,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":148,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":148,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
play = function(word_idx)print('playing word', word_idx, Words[word_idx].recording)if Words[word_idx].recording thenPlaying_source = love.audio.newSource(Words[word_idx].recording)elsePlaying_source = love.audio.newSource('sample.wav', 'static')endPlaying_source:play()Recording_device = nilend
{"to_word_idx":94,"record":147,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":148,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":147,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
record = function(word_idx)if Recording_device thenRecording_device:stop()print('saving to word', word_idx)Words[word_idx].recording = Recording_device:getData()Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":147,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":146,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":146,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
play = function(word_idx)print('playing word', word_idx)if Words[word_idx].recording thenPlaying_source = love.audio.newSource(Words[word_idx].recording)elsePlaying_source = love.audio.newSource('sample.wav', 'static')endPlaying_source:play()Recording_device = nilend
{"to_word_idx":94,"record":145,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":146,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":145,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
record = function(word_idx)if Recording_device thenRecording_device:stop()print('saving to word', word_idx)Words[word_idx].recording = Recording_device:getData()Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":145,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":143,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":144,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
record = function(word_idx)if Recording_device thenRecording_device:stop()Words[word_idx].recording = Recording_device:getData()Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":144,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":143,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":143,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
play = function(word_idx)if Words[word_idx].recording thenPlaying_source = love.audio.newSource(Words[word_idx].recording)elsePlaying_source = love.audio.newSource('sample.wav', 'static')endPlaying_source:play()Recording_device = nilend
{"to_word_idx":94,"record":142,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":143,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":142,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}
record = function(word_idx)if Recording_device thenRecording_device:stop()Words[word_idx].recording = Recording_device:data()Recording_device = nilRecording_word = nilreturnendlocal devices = love.audio.getRecordingDevices()if #devices == 0 then return endRecording_device = devices[1]Recording_device:start()Recording_word = Words[word_idx]Playing_source = nilend
{"to_word_idx":94,"record":142,"draw_new_word_button":117,"draw_teach_word":68,"on_play":96,"draw_recording_button":133,"draw_playing_button":130,"teach_mouse_press":88,"teach_mouse_release":46,"teach_keychord_press":47,"teach_key_release":56,"teach_text_input":49,"Words":12,"on.initialize":7,"Font_height":8,"learn_mouse_press":57,"Playing_source":126,"learn_mouse_release":58,"learn_keychord_press":59,"learn_text_input":60,"learn_key_release":61,"Mode":2,"Recording_word":138,"on.mouse_press":51,"draw_record_button":140,"on.mouse_release":52,"play":135,"on.draw":5,"draw_learn_screen":4,"on.key_release":55,"on":1,"on.text_input":54,"Line_height":9,"Cursor_word":24,"on_record":95,"fw_parent":141,"on_new_word_button":118,"fw_app":"spell-cards","new_word":64,"on.keychord_press":53,"Recording_device":132,"on_word":80,"draw_play_button":141,"draw_teach_screen":110}