Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Setup
- local mic = peripheral.find("microphone")
- local speaker = peripheral.find("speaker")
- -- Record
- mic.startListening()
- mic.startRecording("test")
- sleep(5) -- Record for 5 seconds
- mic.stopRecording()
- -- Play back - just use the recording name!
- speaker.playRecording("test")
- -- Or specify a larger search range if microphone is far away
- speaker.playRecording("test", 32)
Advertisement
Add Comment
Please, Sign In to add comment