Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void startRecord() throws Exception{
- if (record != null){
- record.release();
- }
- File fileOut = new File(FILE);
- if (fileOut != null){
- fileOut.delete(); // delete any existing file at that location.
- }
- record = new MediaRecorder();
- record.setAudioSource(MediaRecorder.AudioSource.MIC);
- record.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
- record.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
- record.setOutputFile(FILE);
- record.prepare();
- record.start();
- }
- "-.... .---- -.... -.-. -.... ..... --... ---.."
- char[] chars = message.toCharArray();
- for (char ch : chars) {
- //add to audio file
- }
Add Comment
Please, Sign In to add comment