Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6928511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:11:51+00:00 2026-05-27T11:11:51+00:00

I am trying to learn Android Development and I was wondering how I can

  • 0

I am trying to learn Android Development and I was wondering how I can capture audio from a microphone and then change the voice in the audio so that it sounds thicker or sharper etc.
In short: How do I record and change the parameters of a sound? (In java, of course)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:11:52+00:00Added an answer on May 27, 2026 at 11:11 am

    I’m actually working on an android app that involves audio. Recording the audio is the easy part, and you can mostly copy my code for that. Writing an audio filter is a much harder task, and requires knowledge of digital signal processing and the Fast Fourier Transform (FFT)

    You could start by reading about audio processing in java here.

    Meanwhile, here’s the code to record audio on android:

    public String record() {
    
                    // please note: the emulator only supports 8 khz sampling.
                    // so in test mode, you need to change this to
                    //int frequency = 8000;
    
                    int frequency = 11025;
    
                    int channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO;
                    int audioEncoding = AudioFormat.ENCODING_PCM_16BIT;
                    File file = new File(Environment.getExternalStorageDirectory()
                                    .getAbsolutePath() + "/reverseme.pcm");
    
                    // Delete any previous recording.
                    if (file.exists())
                            file.delete();
    
                    // Create the new file.
                    try {
                            file.createNewFile();
                    } catch (IOException e) {
                            throw new IllegalStateException("Failed to create "
                                            + file.toString());
                    }
    
                    try {
                            // Create a DataOuputStream to write the audio data into the saved
                            // file.
                            OutputStream os = new FileOutputStream(file);
                            BufferedOutputStream bos = new BufferedOutputStream(os);
                            DataOutputStream dos = new DataOutputStream(bos);
    
                            // Create a new AudioRecord object to record the audio.
                            int bufferSize = 2 * AudioRecord.getMinBufferSize(frequency,
                                            channelConfiguration, audioEncoding);
                            AudioRecord audioRecord = new AudioRecord(
                                            MediaRecorder.AudioSource.MIC, frequency,
                                            channelConfiguration, audioEncoding, bufferSize);
    
                            short[] buffer = new short[bufferSize];
                            audioRecord.startRecording();
    
                            Log.e(tag, "Recording started");
    
                            long start = SystemClock.elapsedRealtime();
                            long end = start + 15000;
                            while (SystemClock.elapsedRealtime() < end) {
                                    int bufferReadResult = audioRecord.read(buffer, 0, bufferSize);
                                    for (int i = 0; i < bufferReadResult; i++)
    
                                            if (ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN)) {
                                                    dos.writeShort( EndianUtils.swapShort(buffer[i]));                                                
                                            } else {
                                                    dos.writeShort( buffer[i] );                                                                
                                            }
                            }
    
                            Log.e(tag, "Recording stopped");
    
                            audioRecord.stop();
                            bos.flush();
                            dos.close();
                            isRecording = false;
                            return file.getAbsolutePath();
    
                    } catch (Exception e) {
                            Log.e(tag, "Recording Failed:" + e.getMessage());
                            throw new RuntimeException("Failed to create " + e.getMessage());
    
                    }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to learn android app development .I am using IntelliJ Idea 10.When
I'm rather new to Android development, and am trying to learn with a bit
I'm trying to learn Html5-based web application development on android OS. But what confuses
I'm trying to learn some Android and java programming in Eclipse. I can run
I am trying to learn SAXParser example which is working properly with Android development
I´m trying to learn C#, coming from a Python/PHP background, and I´m trying to
I'm trying to learn how to build apps for Android. The first simple app,
I am trying to learn about Google maps API. I have a project that
I'm trying to make a tetris game for android to help learn game programming
I am an android developer and now I am trying to learn Mango too.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.