Skip to content

Commit 2f3661e

Browse files
authored
Update README.md
1 parent c842772 commit 2f3661e

1 file changed

Lines changed: 92 additions & 7 deletions

File tree

README.md

Lines changed: 92 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,99 @@
99

1010
AudioTool - an android library that provides useful audio processing functions. This library based on FFMPEG and uses <a href="https://github.com/tanersener/mobile-ffmpeg">mobile-ffmpeg library</a>
1111

12-
### AudioTool provide such functions:
13-
* Filters (filter, bass, noise, vocal, noise)
14-
* Effects (shifter, reverb, echo, reverse)
15-
* Eq (bass, volume, normalize, pitch, speed)
16-
* Modificators (cut, video 2 audio)
17-
* other (waveform, duration, max levels, join, exec ffmpeg / ffprobe)
12+
### AudioTool provides:
1813

14+
<ul>
15+
<li> <b>Filters</b>
16+
<ul>
17+
<li>filterAudio(. . .)</li>
18+
<li>removeAudioNoise(. . .) - remove noise from audio</li>
19+
<li>normalizeAudioVolume(. . .) - normalize audio volume</li>
20+
</ul>
21+
</li>
22+
<li> <b>Equalizer</b>
23+
<ul>
24+
<li>changeAudioBass(. . .) - reduce or increase audio bass</li>
25+
<li>changeAudioVolume(. . .) - reduce or increase audio volume</li>
26+
<li>changeAudioPitch(. . .) - reduce or increase audio pitch</li>
27+
<li>changeAudioSpeed(. . .) - reduce or increase audio speed</li>
28+
</ul>
29+
</li>
30+
<li> <b>Effects</b>
31+
<ul>
32+
<li>applyShifterEffect(. . .) - apply audio pan shifter effect</li>
33+
<li>applyReverbEffect(. . .) - apply audio reverb effect</li>
34+
<li>applyEchoEffect(. . .) - apply audio echo effect</li>
35+
<li>reverseAudio(. . .) - reverse audio</li>
36+
</ul>
37+
</li>
38+
<li> <b>Modificators</b>
39+
<ul>
40+
<li>cutAudio(. . .) - cut audio</li>
41+
<li>convertVideoToAudio(. . .) - convert video to audio</li>
42+
<li>joinAudios(. . .) - join few audio files to single</li>
43+
</ul>
44+
</li>
45+
</li>
46+
<li> <b>Other</b>
47+
<ul>
48+
<li>generateWaveform(. . .) - generate image waveform (png)</li>
49+
<li>getMaxLevelData(. . .) - retrive audio max level data (data can be used to draw waveform)</li>
50+
<li>getDuration(. . .) - retrive audio duration</li>
51+
<li>executeFFmpeg(. . .) - execute ffmpeg command</li>
52+
<li>executeFFprobe(. . .) - execute ffprobe command</li>
53+
</ul>
54+
</li>
55+
</ul>
1956

57+
# Example
58+
## Note: every function will modify previous audio.
59+
### Input audio -> cut -> apply effect -> filter -> output audio with all these modifications
60+
``` java
61+
AudioTool.getInstance(this)
62+
.withAudio(new File("/storage/emulated/0/Music/Linc - AudioTool.mp3"))
63+
.removeVocal(new OnFileComplete() {
64+
@Override
65+
public void onComplete(File output) {
66+
// Output file - audio without vocal
67+
}
68+
})
69+
.applyEchoEffect(Echo.ECHO_OPEN_AIR, new OnFileComplete() {
70+
@Override
71+
public void onComplete(File output) {
72+
// Output file - audio file with echo effect and without vocal
73+
}
74+
})
75+
76+
/* calls */
77+
.release();
78+
```
79+
#### If you want to save current audio file state - use saveCurrentTo(path). Current audio will be saved as separate file and AudioTool continue modify input file from withAudio() parameters.
80+
``` java
81+
AudioTool.getInstance(this)
82+
.withAudio(new File("/storage/emulated/0/Music/Linc - AudioTool.mp3"))
83+
.removeVocal(output-> {/* do something with output */})
84+
.applyEchoEffect(Echo.ECHO_OPEN_AIR, output-> {/* do something with output */})
85+
.saveCurrentTo("/storage/emulated/0/Music/NewAudio.mp3") // Audio file with echo and without vocal
86+
.release();
87+
```
88+
#### You can save audio to new file after every function call
89+
``` java
90+
AudioTool.getInstance(this)
91+
.withAudio(new File("/storage/emulated/0/Music/Linc - AudioTool.mp3"))
92+
.removeVocal(output-> {/* do something with output */})
93+
.saveCurrentTo("/storage/emulated/0/Music/Instrumental.mp3") // Audio file without vocal
94+
.applyEchoEffect(Echo.ECHO_OPEN_AIR, output-> {/* do something with output */})
95+
.saveCurrentTo("/storage/emulated/0/Music/NewAudio.mp3") // Audio file with echo and without vocal
96+
.release();
97+
```
98+
#### Also, don't forget to call release() function when you finish work with AudioTool. The function remove buffer files from storage and clear other resources.
99+
``` java
100+
AudioTool.getInstance(this)
101+
.withAudio(new File("/storage/emulated/0/Music/Linc - AudioTool.mp3"))
102+
/* calls */
103+
.release(); // Always call this function
104+
```
20105
# Download
21106
## Gradle
22107
``` groovy
@@ -81,4 +166,4 @@ AudioTool don't process audio in the background thread because of :
81166
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
82167
See the License for the specific language governing permissions and
83168
limitations under the License.
84-
```
169+
```

0 commit comments

Comments
 (0)