Skip to content

Portable C voice/duplex capture and low latency feedback

License

Notifications You must be signed in to change notification settings

type-one/SideToneDuplex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SideTone Duplex

Portable C duplex voice capture and low latency feedback

https://github.com/type-one/SideToneDuplex

Other (higher) latency but more flexible versions are available at https://github.com/type-one/SideTone https://github.com/type-one/CSideTone

What

Small test program written in C 17 to have voice feedback with short latency. The code is portable and use the miniaudio framework (https://miniaud.io/).

Why

The purpose was to test the duplex feature of miniaudio and which minimum period it was possible to reach (between 1 ms and 8 ms).

This small framework can be a start for more complex sound processing on the feedback voice.

How

Can be compiled and Linux and Windows, and should be easily adapted for other platforms supported by miniaudio (Mac, Android, BSD).

The underlying miniaudio uses the standard default sound API of the OS (Linux/ALSA, Windows/WinMM, Android/OpenSLES, Mac/CoreAudio...) and not a specific low latency one (Jack, ASIO, ...), with default parameters.

On Linux, just use cmake . On Windows, just use cmake-gui to generate a Visual Studio solution

Tested on Windows 10 and Ubuntu/Debian Linux (on native host and in VMplayer). It should work also on Raspberry Pi. It just use default capture and playback devices.

Launch in a shell using "sidetone_duplex.exe" or "sidetone_duplex" Press "enter" to exit

You can play with different parameters in the audio/audio_config.hpp file: format, sample rate, channels, period.

Recommended parameters are 22050 hz, mono (1 channel), signed 16, and a period of 1 ms for Windows and 8 ms for Linux.

Enjoy

Author

Laurent Lardinois / Type One (TFL-TDV)

https://be.linkedin.com/in/laurentlardinois

https://demozoo.org/sceners/19691/

About

Portable C voice/duplex capture and low latency feedback

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages