https://github.com/mukarillo/unityaudiorecorder
Multi-platform helper to record audio.
https://github.com/mukarillo/unityaudiorecorder
audio audio-recorder record-audio unity unity-asset unity3d unityaudio unitytool
Last synced: 2 months ago
JSON representation
Multi-platform helper to record audio.
- Host: GitHub
- URL: https://github.com/mukarillo/unityaudiorecorder
- Owner: Mukarillo
- Created: 2018-12-26T23:36:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T00:21:35.000Z (about 2 years ago)
- Last Synced: 2025-02-28T16:55:38.662Z (3 months ago)
- Topics: audio, audio-recorder, record-audio, unity, unity-asset, unity3d, unityaudio, unitytool
- Language: C#
- Size: 33.2 KB
- Stars: 12
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# UnityAudioRecorder
Multi-platform helper to record audio.## How to use
*you can find a pratical example inside this repository in Main scene*### 1 - Create a new instance of ```AudioRecorder```
```c#
public class Exemple : MonoBehaviour
{
private AudioRecorder recorder = new AudioRecorder();
}
```### 2 - Call ```AudioRecorder.StartRecording``` with the callback and maximum length
```c#
public class Exemple : MonoBehaviour
{
private AudioRecorder recorder = new AudioRecorder();
public void Record()
{
recorder.StartRecording(OnFinishRecording, 20);
}
private void OnFinishRecording(AudioClip clip)
{
//clip is the recorded clip
}
}
```### 3 - If you want to end the record, just call ```AudioRecorder.EndRecording```. It will invoke the callback that was set in the StartRecording method.
## AudioRecorder `public` overview
### Properties
> `AudioRecorder.isRecording`
- *Description*: Returns true if is recording an audio.### Methods
> `AudioRecorder.StartRecording`
- *Description*: Starts recording using the default microphone.- *Parameters* :
|name |type |description |
|--|--|--|
|`completeCallback` |**UnityAction\** |*Callback to be called when the recording is done.* |
|`maxClipLenth` |**int** |*Maximum size of the clip in seconds.* |> `AudioRecorder.StopRecording`
- *Description*: Stops recording and do not callback.> `AudioRecorder.EndRecording`
- *Description*: Stops recording and callback.## External tools
-[UnityWav - by DeadlyFingers](https://github.com/deadlyfingers/UnityWav)
-[SavWav - by DarkTable](https://gist.github.com/darktable/2317063)