https://github.com/joshpetit/simple-java-microphone-api
A simple API to work with microphones in java
https://github.com/joshpetit/simple-java-microphone-api
java java-microphone-api library microphone simple
Last synced: over 1 year ago
JSON representation
A simple API to work with microphones in java
- Host: GitHub
- URL: https://github.com/joshpetit/simple-java-microphone-api
- Owner: joshpetit
- Created: 2020-07-24T01:18:53.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-16T14:46:56.000Z (almost 6 years ago)
- Last Synced: 2025-01-28T13:52:14.010Z (over 1 year ago)
- Topics: java, java-microphone-api, library, microphone, simple
- Language: Java
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Java Microphone API
An easy to use project I made to help with a few other projects that require
simple audio functions. Likely won't publish artifact until my use for this is
exacerbated and I stop updating it.
## Usage
### Initialize
`RecordBlob record = new RecordBlob(Record.Formats.DEFAULT, AudioFileFormat.Type.WAVE);`
### Record
```
record.startRecord();
try {
Thread.sleep(5000); //Records for 5 seconds
} catch (InterruptedException e) {
e.printStackTrace();
}
record.stopRecord();
```
### Play
```
record.play();
Thread.sleep(5000); //Allows the audio to play for 5 seconds
```
### Saving Files
```
File file = new File("test.wav");
record.saveFile(file.getPath()); //Path or String argument
```
### Useful methods
```
getAudioFile();
replay();
getAudioClip();
loop();
pause();
deleteRecording();
```