Skip to content

Commit

Permalink
Update documents
Browse files Browse the repository at this point in the history
  • Loading branch information
mochi-neko committed Sep 5, 2023
1 parent bc36b11 commit 93575fc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2dffde2443bc4aa2a6d1155b1d78cd44, type: 3}
m_Name: SampleVADParameters
m_EditorClassIdentifier:
activeVolumeThreshold: 0.005
activeVolumeThreshold: 0.01
maxQueueingTimeSeconds: 0.5
minQueueingTimeSeconds: 0.2
activationRateThreshold: 0.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

namespace Mochineko.VoiceActivityDetection.Samples
{
/// <summary>
/// A sample of voice activity detection by CumulativeVoiceActivityDetector.
/// </summary>
internal sealed class VADCamulationSample : MonoBehaviour
{
[SerializeField]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
namespace Mochineko.VoiceActivityDetection
{
/// <summary>
/// A simple implementation of <see cref="IVoiceActivityDetector"/>.
/// Detects voice activity by using voice segment queue, volume threshold, activation/deactivation rate and interval.
/// A voice activity detector that queues voice segments and detects activity by rate.
/// </summary>
public sealed class QueueingVoiceActivityDetector : IVoiceActivityDetector
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/Mochineko/VoiceActivityDetection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.mochineko.voice-activity-detection",
"version": "0.3.2",
"version": "0.4.0",
"displayName": "Voice Activity Detection",
"description": "A voice activity detection library for Unity.",
"unity": "2022.3",
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0] - 2023-09-05

### Added
- Add another VAD logic: `CumulativeVoiceActivityDetector`.
- Add a sample of `CumulativeVoiceActivityDetector`.

### Changed
- Make `VoiceSegment` class to prevent struct copy and memory leak.

## [0.3.2] - 2023-09-05

### Fixed
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ You can customize voice sources, voice buffers,
- [x] AudioClip -> [AudioClipBuffer](./Assets/Mochineko/VoiceActivityDetection/AudioClipBuffer.cs)
- Voice activity detection logics
- [x] Queueing-based simple VAD logic -> [QueueingVoiceActivityDetector](./Assets/Mochineko/VoiceActivityDetection/QueueingVoiceActivityDetector.cs)
- Less memory usage but less stability
- [x] Cumulative VAD logic -> [CumulativeVoiceActivityDetector](./Assets/Mochineko/VoiceActivityDetection/CumulativeVoiceActivityDetector.cs)
- More stability but more memory usage and less noise robustness

## How to import by UnityPackageManager

Expand All @@ -28,7 +31,7 @@ Add following dependencies to your `/Packages/manifest.json`.
```json
{
"dependencies": {
"com.mochineko.voice-activity-detection": "https://github.com/mochi-neko/voice-activity-detection-unity.git?path=/Assets/Mochineko/VoiceActivityDetection#0.3.2",
"com.mochineko.voice-activity-detection": "https://github.com/mochi-neko/voice-activity-detection-unity.git?path=/Assets/Mochineko/VoiceActivityDetection#0.4.0",
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask",
"com.neuecc.unirx": "https://github.com/neuecc/UniRx.git?path=Assets/Plugins/UniRx/Scripts",
"com.naudio.core": "https://github.com/mochi-neko/simple-audio-codec-unity.git?path=/Assets/NAudio/NAudio.Core#0.2.0",
Expand All @@ -43,6 +46,7 @@ Add following dependencies to your `/Packages/manifest.json`.
- [VAD with echo](./Assets/Mochineko/VoiceActivityDetection.Samples/VADAudioClipEchoSample.cs)
- [VAD by AudioSource](./Assets/Mochineko/VoiceActivityDetection.Samples/VADAudioSourceSample.cs)
- [VAD with OpenAI/Whisper API transcription](./Assets/Mochineko/VoiceActivityDetection.Samples/VADToWhisperSample.cs)
- [VAD by cumulative logic](./Assets/Mochineko/VoiceActivityDetection.Samples/VADCamulationSample.cs)

See also [Samples](./Assets/Mochineko/VoiceActivityDetection.Samples).

Expand Down

0 comments on commit 93575fc

Please sign in to comment.