Sinua
Connect your appVoice

Mic & test tone

Drive the visual from the device microphone, or from a synthetic voice for previews and tests.

Two sources need no vendor at all.

  • Microphone: LocalMicVoiceSource measures the device microphone, so the visual reacts to the user's own voice. It asks for permission when you connect it. On Android, your app declares RECORD_AUDIO, since the library doesn't. On iOS it leaves the audio session to your app if you ask it to.
  • Test tone: TestToneVoiceSource synthesizes speech-like bursts. Its output gain is zero, so nothing is heard and no permission is needed, which makes it good for previews, screenshots and automated tests.

Both run the same analysis on every platform (a level plus 16 log-spaced bands), checked against shared test vectors, so a visual tuned on one platform reacts the same way on the others.

mic-and-tone-web.ts
import { LocalMicVoiceSource } from "@sinua/voice/mic";
import { TestToneVoiceSource } from "@sinua/voice/tone";

// The user's own mic, analysed on the device (no network).
export const mic = new LocalMicVoiceSource();

// A synthetic, speech-like signal: no mic, no network, silent. Good for demos and tests.
export const tone = new TestToneVoiceSource();
PlatformPackage
WebLocalMicVoiceSource from @sinua/voice/mic, TestToneVoiceSource from @sinua/voice/tone
iOSSinuaVoice
Androiddev.sinua.voice (in the core library)