Shows a graphic representation of the sounds captured by the microphone on Android

Related tags

UI/UX AudioWaves
Overview

Audio Waves

Shows a graphic representation of the sounds captured by the microphone on Android

android_audio_waves

GRADLE:

Add this to your app/build.gradle

repositories {
    	...
    	maven { url 'https://github.com/FireZenk/maven-repo/raw/master/'}
}
dependencies {
		...
        compile 'org.firezenk:audiowaves:1.1@aar'
}

USAGE:

  1. Add permission to record audio (into your Manifest)

    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    
  2. Add the new xmls to your layout parent widget

    xmlns:aw="http://schemas.android.com/apk/res-auto"
    
  3. Add AudioWeaves to your layout and configure it

    <org.firezenk.audiowaves.Visualizer
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        aw:aw_format="vertical_lines"
        aw:aw_gravity="center"
        aw:aw_width="100"
        aw:aw_height="200"
        aw:aw_num_waves="10"
        aw:aw_line_with="30"
        aw:aw_line_min_with="30"
        aw:aw_line_height="30"
        aw:aw_line_min_height="30"
        aw:aw_line_spacing="10"
        aw:aw_line_border_radius="50"
        aw:aw_ball_diameter="30"
        aw:aw_color_uniform="@color/YOUR_COLOR_HERE"
        aw:aw_color_is_gradient="true"
        aw:aw_color_gradient_start="@color/YOUR_START_COLOR"
        aw:aw_color_gradient_end="@color/YOUR_END_COLOR" />
    
  4. Start (and stop) the listener

    ((Visualizer) findViewById(R.id.visualizer)).startListening(); //to stop: .stopListening()
    
  5. (Optional) Also you can configure AudioWeaves by code

    void setFormat(int format);
    
    void setGravity(int gravity);
    
    void setDimens(int width, int height);
    
    void setWidth(int width);
    
    void setHeight(int height);
    
    void setNumWaves(int waves);
    
    void setLineDimens(int width, int height);
    
    void setLineWidth(int width);
    
    void setLineHeight(int height);
    
    void setLineMinDimens(int minWidth, int minHeight);
    
    void setLineMinWidth(int minWidth);
    
    void setLineMinHeight(int minHeight);
    
    void setLineSpacing(int spacing);
    
    void setLineBorderRadius(int borderRadius);
    
    void setBallDiameter(int ballDiameter);
    
    void setColor(int color);
    
    void setIsGradient(boolean isGradient);
    
    void setGradient(int startColor, int endColor);
    
    void setGradientColorStart(int color);
    
    void setGradientColorEnd(int color);
    

MORE INFO:

Go to sample module

LICENSE

The MIT License (MIT)

Copyright (c) 2015 Jorge Garrido Oval <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Comments
  • Failed to resolve org.firezenk:audiowaves:1.1

    Failed to resolve org.firezenk:audiowaves:1.1

    I tried :

    1. Adding maven { url 'https://github.com/FireZenk/maven-repo/raw/master/'} in build.gradle (Project) [No errors] but can't add Visualizer to Layouts.
    2. Also adding compile 'org.firezenk:audiowaves:1.1@aar' in build.gradle (Module) . [Error] Failed to resolve org.firezenk:audiowaves:1.1
    3. Only adding compile 'org.firezenk:audiowaves:1.1@aar' in build.gradle (Module). [Error] same as above.
    opened by gamebusterz 1
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 0
  • Update README.md

    Update README.md

    Added description of where exactly to add the dependencies. If app/build.gradle does not have a repositories block and project/build.gradle does, it might lead to a confusion as to where to add those dependencies.

    opened by gamebusterz 0
  • Insufficient Entropy CWE ID 331

    Insufficient Entropy CWE ID 331

    Standard random number generators do not provide a sufficient amount of entropy when used for security purposes. Attackers can brute force the output of pseudorandom number generators such as rand().

    opened by umakantviprak 0
  • Sensitivity

    Sensitivity

    Nice project.

    a) How would one Increase the sensitivity as it currently does not fire very well with normal conversation. b) Would it be possible to slow down the vertical drop of each bar so it has a better visual effect ? Currently the spikes disappear very quickly so it is almost difficult to see them.

    thanks

    opened by Krammig 0
  • Can't stop listening

    Can't stop listening

    Hi!

    Thank you a lot for your sharing your work!

    stopListening() does nothing. The visualizer is still updated.

    Context : I want to start listening when I click on the start button, then stop when I click on another button.

    Did anybody face this behavior?

    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.record_sound, container, false);
        visualizer = view.findViewById(R.id.visualizer);
    
        view.findViewById(R.id.start).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                visualizer.startListening();
            }
        });
    
        view.findViewById(R.id.stop).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                visualizer.stopListening();
            }
        });
        return view;
    }
    
    help wanted question 
    opened by corentinc 4
  • How to use your library when recording audio using mic?

    How to use your library when recording audio using mic?

    Hello!

    Thank you for sharing your work!

    I am struggling to make it work in parallel with audio recording. I get MediaRecorder IllegalState exception again and again.

    I am using your visualiser this way:

     private void startRecording() {
            mRecorder = new MediaRecorder();
            mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
            mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
            mRecorder.setOutputFile(mFileName);
            mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_WB);
    
            try {
                mRecorder.prepare();
            } catch (IOException e) {
                Timber.e("prepare() failed");
            }
           mRecorder.start();
           mVisualizer.startListening();
        }
    
        private void stopRecording() {
            mVisualizer.stopListening();
            mRecorder.stop();
            mRecorder.release();
            mRecorder = null;
        }
    

    What do I do wrong?

    opened by Gaket 2
  • Can you build an api to render the views, from a data set that is inputtable to your api

    Can you build an api to render the views, from a data set that is inputtable to your api

    Can you build an api to render the views, from a data set that is inputtable to your api, and thus remove the dependency from the DSP library that you are using?

    opened by bhargavms 0
Owner
Jorge Garrido
Android expert at Jacoti (ex @riseapplications @viscaweb & @mrmilu) Open source lover, clean coder, game dev, ninja rider & much more
Jorge Garrido
This is a sample Android Studio project that shows the necessary code to create a note list widget, And it's an implementation of a lesson on the Pluralsight platform, but with some code improvements

NoteKeeper-Custom-Widgets This is a sample Android Studio project that shows the necessary code to create a note list widget, And it's an implementati

Ibrahim Mushtaha 3 Oct 29, 2022
TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Tan Jun Rong 2.6k Jan 5, 2023
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

Muthuramakrishnan Viswanathan 1.2k Dec 30, 2022
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

About MarkdownView (Markdown For Android) is an Android library that helps you display Markdown text or files (local/remote) as formatted HTML, and st

Feras Alnatsheh 1k Dec 20, 2022
SwipeBack for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swipe gesture

SwipeBack SwipeBack is for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swi

Hannes Dorfmann 697 Dec 14, 2022
A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Benoit Lubek 498 Dec 29, 2022
Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (https://github.com/romannurik/android-wizardpager)

Wizard Pager Wizard Pager is a library that provides an example implementation of a Wizard UI on Android, it's based of Roman Nurik's wizard pager (ht

Julián Suárez 520 Nov 11, 2022
Make your native android Toasts Fancy. A library that takes the standard Android toast to the next level with a variety of styling options. Style your toast from code.

FancyToast-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ... ma

Shashank Singhal 1.2k Dec 26, 2022
Make your native android Dialog Fancy. A library that takes the standard Android Dialog to the next level with a variety of styling options. Style your dialog from code.

FancyAlertDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ..

Shashank Singhal 350 Dec 9, 2022
Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#

Xamarin.Android Xamarin.Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#. Build Status Platform

Xamarin 1.8k Jan 5, 2023
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022
Bootstrap style widgets for Android, with Glyph Icons

Android-Bootstrap Android Bootstrap is an Android library which provides custom views styled according to the Twitter Bootstrap Specification. This al

Bearded Hen 7.3k Jan 3, 2023
[] A fast PDF reader component for Android development

This project is no longer maintained. You can find a good replacement here, which is a fork relying on Pdfium instead of Vudroid/MuPDF for decoding PD

Joan Zapata 2.8k Dec 16, 2022
[] Define and render UI specs on top of your Android UI

dspec A simple way to define and render UI specs on top of your Android UI. Usage Enclose the target UI with a DesignSpecFrameLayout, usually the root

Lucas Rocha 561 Dec 16, 2022
A Material design Android pincode library. Supports Fingerprint.

LolliPin A Lollipop material design styled android pincode library (API 14+) To include in your project, add this to your build.gradle file: //Loll

Omada Health 1.6k Nov 25, 2022
Android Library to implement simple touch/tap/swipe gestures

SimpleFingerGestures An android library to implement simple 1 or 2 finger gestures easily Example Library The library is inside the libSFG folder Samp

Arnav Gupta 315 Dec 21, 2022