Guest User

Untitled

a guest
Oct 23rd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. public void startRecord() throws Exception{
  2. if (record != null){
  3. record.release();
  4. }
  5.  
  6. File fileOut = new File(FILE);
  7. if (fileOut != null){
  8. fileOut.delete(); // delete any existing file at that location.
  9. }
  10.  
  11. record = new MediaRecorder();
  12. record.setAudioSource(MediaRecorder.AudioSource.MIC);
  13. record.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
  14. record.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
  15. record.setOutputFile(FILE);
  16.  
  17. record.prepare();
  18. record.start();
  19. }
  20.  
  21. "-.... .---- -.... -.-. -.... ..... --... ---.."
  22.  
  23. char[] chars = message.toCharArray();
  24. for (char ch : chars) {
  25. //add to audio file
  26. }
Add Comment
Please, Sign In to add comment