GithubHelp home page GithubHelp logo

joon623 / audiorecordview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from armen101/audiorecordview

0.0 0.0 0.0 176 KB

A flexible, efficient library written in Kotlin for drawing real wave forms while recording. Free, easy and convenient to use.

License: Apache License 2.0

Java 11.57% Kotlin 88.43%

audiorecordview's Introduction

AudioRecordView

Audio visualizer that can be used during sound recording

How to include?

Add the repository to your project build.gradle:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

And add the library to your module build.gradle:

dependencies {
  implementation 'com.github.Armen101:AudioRecordView:1.0.5'
}

Or Maven

<dependency>
  <groupId>com.github.Armen101</groupId>
  <artifactId>AudioRecordView</artifactId>
  <version>1.0.5</version>
</dependency>

How do I use AudioRecordView?

in XML

<com.visualizer.amplitude.AudioRecordView
        android:id="@+id/audioRecordView"
        android:layout_width="256dp"
        android:layout_height="64dp"
        app:chunkAlignTo="bottom"                                  
        app:chunkRoundedCorners="true"
        app:chunkSoftTransition="true"                                  
        app:chunkColor="@color/app_style_blue"
        app:chunkSpace="1dp"
        app:chunkWidth="2dp"
        app:chunkMaxHeight="48dp"
        app:chunkMinHeight="2dp"
        app:direction="leftToRight"/>

Drawing

You can execute this code in a timer, for example, every 100 milliseconds

 val audioRecordView: AudioRecordView = findViewById(R.id.audioRecordView)
 
 // in the timer
 val currentMaxAmplitude = getMediaRecorder().getMaxAmplitude()
 audioRecordView.update(currentMaxAmplitude)   //redraw view

At the end or before reuse

audioRecordView.recreate()

Compatibility

Minimum Android SDK: AudioRecordView requires a minimum API level of 16.

Also you can see

Sample project in github

Tutorial in Medium

License

Apache 2.0. See the LICENSE. file for details.

Author Armen Gevorgyan

audiorecordview's People

Contributors

armen101 avatar kazemihabib avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.