# @types/react-mic

> TypeScript definitions for react-mic

Latest version **12.4.6** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-mic
pnpm add @types/react-mic
yarn add @types/react-mic
bun add @types/react-mic
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 12.4.6 |
| Published | 2023-11-07 |
| First published | 2019-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-mic
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-mic
- npm.io page: https://npm.io/package/@types/react-mic

## Dependencies (1)

- [@types/react](https://npm.io/package/@types/react.md) *

## Recent versions

- 12.4.6 (latest) — 2023-11-07
- 12.4.3 (ts3.6) — 2021-07-08
- 12.4.2 (ts2.9) — 2020-05-04
- 12.4.1 (ts2.8) — 2020-02-10
- 12.4.5 — 2023-10-18
- 12.4.4 — 2023-09-27
- 12.4.0 — 2019-12-18

## README

# Installation
> `npm install --save @types/react-mic`

# Summary
This package contains type definitions for react-mic (https://hackingbeauty.github.io/react-mic).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-mic.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-mic/index.d.ts)
````ts
import * as React from "react";

/**
 * Record a user's voice and display as an oscillation (or frequency bars).
 */
export class ReactMic extends React.PureComponent<ReactMicProps> {}

/**
 * The object sent when the recording stops
 */
export interface ReactMicStopEvent {
    blob: Blob;
    startTime: number;
    stopTime: number;
    option: {
        audioBitsPerSecond: number;
        mimeType: string;
    };
    blobURL: string;
}

export interface ReactMicProps {
    /** Set to true to begin recording */
    record?: boolean | undefined;

    /** Available in React-Mic-Plus upgrade only */
    pause?: boolean | undefined;

    visualSetting?: "sinewave" | "frequencyBars" | undefined;

    className?: string | undefined;

    /** Callback that is executed when audio stops recording */
    onStop?: ((recordedData: ReactMicStopEvent) => void) | undefined;

    /** Callback that is executed when chunk of audio is available */
    onData?: ((recordedData: Blob) => void) | undefined;

    /** defaults -> "audio/webm".  Set to "audio/wav" for WAV or "audio/mp3" for MP3 audio format (available in React-Mic-Gold) */
    mimeType?: "audio/webm" | "audio/wav" | undefined;

    /** Sound wave color */
    strokeColor?: string | undefined;

    /** Background color */
    backgroundColor?: string | undefined;

    /** Specify 1 for mono, defaults -> 2 (stereo) */
    channelCount?: 1 | 2 | undefined;

    /** Enables/disables echo cancellation, defaults -> false */
    echoCancellation?: boolean | undefined;

    /** Enables/disables auto gain control, defaults -> false */
    autoGainControl?: boolean | undefined;

    /** Enables/disables background noise suppression, defaults -> false */
    noiseSuppression?: boolean | undefined;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/react](https://npmjs.com/package/@types/react)

# Credits
These definitions were written by [mikaello](https://github.com/mikaello).

---
_Source: https://npm.io/package/@types/react-mic · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
