Skip to content

EitanWong/com.eitan.easymic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

51 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Easy Mic Icon

Easy Mic for Unity

External audio capture, playback, and processing for Unity

Version 0.1.3-exp.3 Unity 2021.3+ GPLv3 License Supported platforms

๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡็‰ˆ | ๐Ÿ‡บ๐Ÿ‡ธ English

Release: 0.1.3-exp.3 ยท 2026-05-12

Read the docs Open samples View changelog

Built for voice interaction, digital humans, custom playback, and realtime audio diagnostics.


Repository scope: this repository contains the open-source Easy Mic core package. It does not include AEC, AGC, or ANS. Those features are provided by EasyMic APM, a separate paid extension package. If you need acoustic echo cancellation, automatic gain control, or automatic noise suppression, please contact the author separately.

Included
Microphone capture
Raw audio buffers
Included
Runtime audio pipeline
Built-in processors
Optional
Sherpa ONNX integration
ASR / KWS workflows
Paid Add-on
EasyMic APM
AEC / AGC / ANS

Audio I/O for interactive Unity applications

Easy Mic provides miniaudio-backed microphone capture, external playback, processor pipelines, latency profiles, and diagnostics outside Unity's built-in audio path.


Capture
Low-latency microphone input with device selection and transport buffering.


Playback
Streaming and clip playback through EasyMic's external audio system.


Processing
Composable audio processors with explicit realtime and threading contracts.


Diagnostics
Telemetry for underruns, overflows, callback health, queue depth, and workers.

Designed for voice interaction, AI characters, custom audio tools, and realtime audio workflows.


๐ŸŽฌ See It In Action

Watch Demo

Unity Digital Human Microphone Recording Plugin
Easy Mic core + optional EasyMic APM workflow for conversational AI

This video demonstrates a conversational AI audio workflow. Echo cancellation, gain control, and noise suppression are not included in this repository; they require the separate paid EasyMic APM extension.


โœจ Key Features

Low-latency recording

  • miniaudio-backed device access
  • capture transport worker and unmanaged ring buffer
  • diagnostics for overflows, drops, and callback health

External playback

  • stream and clip playback APIs
  • render worker with watermark scheduling
  • underrun zero-fill and telemetry

Processor contracts

  • transport-safe processor marker interfaces
  • main-thread and realtime-forbidden separation
  • clear Unity API threading guidance

Developer visibility

  • latency profiles for different stability targets
  • pipeline visualization and project settings tooling
  • bilingual documentation and practical samples

๐Ÿ’Ž EasyMic APM Extension - Paid Professional 3A Audio Processing

APM Solution

For developers working on Unity AI digital human projects, EasyMic APM (Audio Processing Module) is available as a separate paid extension package.

This repository does not contain AEC, AGC, or ANS implementation code, binaries, samples, or licenses.

๐Ÿ”‡
AEC
Acoustic Echo Cancellation
Eliminates echo and feedback
๐Ÿ“ข
AGC
Automatic Gain Control
Maintains consistent audio levels
๐ŸŽฏ
ANS
Acoustic Noise Suppression
Reduces background noise

๐Ÿ“ง Contact: unease-equity-5c@icloud.com | ๐Ÿ’ฌ Bilibili: Send private message

Please contact separately if your project needs AEC, AGC, or ANS.

Demo Video

๐Ÿš€ Quick Start

๐Ÿ“ฆ Installation

  1. Open Unity Package Manager
  2. Click + โ†’ Add package from git URL...
  3. Enter: https://github.com/EitanWong/com.eitan.easymic.git#upm
  4. Click Add

๐Ÿ“‹ Import Sample Scene

  1. After importing Easy Mic, go to Package Manager
  2. Find EasyMic in "In Project" packages
  3. Expand Samples section
  4. Click Import next to "Recording Example"
  5. Open the imported scene to see microphone recording demo
How to Import Samples

Import the Recording Example sample scene via Package Manager

โšก Basic Usage

// Ensure permission (Android triggers system request)
if (!PermissionUtils.HasPermission()) return;

// Refresh device list EasyMicAPI.Refresh();

// Define processor blueprints var bpCapture = new AudioWorkerBlueprint(() => new AudioCapturer(10), key: "capture"); var bpDownmix = new AudioWorkerBlueprint(() => new AudioDownmixer(), key: "downmix");

// Start recording (auto-selects default device/channel) var handle = EasyMicAPI.StartRecording(SampleRate.Hz16000);

// Attach processors EasyMicAPI.AddProcessor(handle, bpDownmix); EasyMicAPI.AddProcessor(handle, bpCapture);

// ... later: stop and get captured clip EasyMicAPI.StopRecording(handle); var clip = EasyMicAPI.GetProcessor(handle, bpCapture)?.GetCapturedAudioClip();


๐Ÿงช Sample Projects Overview

EasyMic includes ready-to-run samples under EasyMic/Packages/com.eitan.easymic/Samples~/ so developers can quickly validate workflows.

Sample Purpose Best For
Recording Example Basic microphone recording flow and WAV persistence. First-time integration and device/permission checks.
Playback Example Core playback flow using EasyMic playback stack. Verifying low-latency output and playback controls.
AudioPlayback API Example Programmatic playback API usage and queue-style audio feeding. Building custom runtime audio playback logic.
SherpaONNXUnity ASR Example Real-time speech recognition pipeline with Sherpa ONNX + EasyMic input. Speech-to-text applications and voice command prototypes.
SherpaONNXUnity KWS Example Keyword spotting / wake-word workflow with Sherpa ONNX. Wake-word activation and always-listening assistants.
AIChat Example End-to-end AI voice chat sample (ASR + LLM + TTS + playback orchestration). Direct starting point for digital human / AI avatar apps.

AIChat Sample Notes

  • The AIChat Example is designed as a production-oriented reference pipeline for conversational digital humans.
  • It demonstrates end-to-end flow from microphone input to speech recognition, LLM response generation, and speech synthesis playback.
  • Install com.eitan.sherpa-onnx-unity before importing/running this sample.
  • AEC, AGC, and ANS are not included in this repository. Use the separate paid EasyMic APM extension for those capabilities.

๐Ÿ“š Documentation


๐ŸŽฏ Use Cases

๐Ÿค–
AI Digital Humans
  • Real-time voice interaction
  • Conversation AI workflows
  • Optional APM add-on for echo cancellation
  • Natural language processing
๐ŸŽฎ
Gaming Applications
  • Voice chat in multiplayer
  • Voice commands for control
  • Real-time audio effects
๐Ÿ“ž
Communication Apps
  • VoIP applications
  • Video conferencing tools
  • Real-time audio streaming
๐ŸŽ™๏ธ
Content Creation
  • Podcast recording tools
  • Voice-over applications
  • Audio content workflows

๐Ÿ“‹ System Requirements

Unity
2021.3 LTS or higher
Platforms
Windows, macOS, Linux
Android, iOS
Dependencies
.NET Standard 2.1+
Permissions
Microphone access required

๐Ÿ“„ License

This project is licensed under the GPLv3 License - see the LICENSE.md file for details.

EasyMic APM is not part of this repository. It is distributed separately as a paid extension under its own commercial licensing terms.

โœ… Open Source Friendly

  • Free to use in open source projects
  • Commercial use allowed with GPL compliance

โš ๏ธ Commercial Projects

  • Source code disclosure required
  • GPL compliance mandatory for distribution

๐Ÿค Community & Support

๐Ÿ›
Issues & Bug Reports
GitHub Issues
Check Troubleshooting first
๐Ÿ’ฌ
Community Discussion
GitHub Discussions
Share projects & get help
๐Ÿ“ง
Professional Support
Email | Bilibili PM
Technical support and EasyMic APM inquiries

Design Principles

Thin callback path
Keep device callbacks focused on transport work.
Worker-based processing
Run higher-level processing outside the device callback.
Observable behavior
Expose counters that help diagnose latency and glitches.
Practical Unity workflow
Keep samples, components, and docs close to the package.

Start building with Easy Mic

Import the package, open a sample, and use diagnostics while validating on your target device.

Get Started View Samples Contact APM


Made with โค๏ธ by Eitan
Star โญ this repo if Easy Mic helps your project!

GitHub stars GitHub forks

About

A simple Unity plugin for low-latency raw audio capture with a modular real-time processing pipeline.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors

Generated from EitanWong/upm-template