> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reverieinc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Key Features

### `domain`

The universe in which the Streaming STT API is used for transcribing the speech. Refer to [Supporting Domain](/usage-guides/speech-to-text/supported-domains) to see the available domains.

**For Example**:

<CodeGroup>
  ```javascript generic theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      domain: 'generic', // <-- Generic domain
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```

  ```javascript bfsi theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      domain: 'bfsi', // <-- BFSI domain
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```
</CodeGroup>

### `timeout`

The duration to keep a connection open between the application and the STT server. Note: The default timeout = 15 seconds, and the maximum time allowed = 180 seconds.

**For Example**:

<CodeGroup>
  ```javascript timeout = 15 theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      domain: 'generic',
      timeout:15, // <-- timeout = 15 seconds
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```

  ```javascript timeout = 180 theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      domain: 'generic',
      timeout:180, // <-- timeout = 180 seconds
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```
</CodeGroup>

### `silence`

The time to determine when to end the connection automatically after detecting the silence after receiving the speech data. For Example: Consider `silence` = 15 seconds i.e., On passing the speech for 60 seconds, and if you remain silent, the connection will be open for the next 15 seconds and then will automatically get disconnected. Note: The default `silence`= 1 second, and the maximum `silence` = 30 seconds.

**For Example**:

<CodeGroup>
  ```javascript silence = 1 theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      domain: 'generic',
      silence:1, // <-- silence = 1 seconds
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```

  ```javascript silence = 30 theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      domain: 'generic',
      silence:30, // <-- silence = 30 seconds
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```
</CodeGroup>

### `format`

The audio sampling rate and the data format of the speech. Refer to [Supporting Audio Formats](/usage-guides/speech-to-text/supported-audio-formats) to know the supporting audio formats. By default, the `format` = 16k\_int16. (WAV, Signed 16 bit, 16,000 or 16K Hz).

**For Example**:

<CodeGroup>
  ```javascript format = 16k_int16 theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      domain: 'generic',
      format:"16k_int16", // <-- format = 16k_int16 
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```

  ```javascript format = wav theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      domain: 'generic',
      format: "wav", // <-- format = wav 
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```
</CodeGroup>

### `logging`

Possible Values are:

1. `true` - stores audio and keep transcripts in logs.

2. `no_audio` -  does not store audios but keep transcripts in logs.

3. `no_transcript` - does not keep transcripts in logs but stores audios.

4. `false` - does not keep neither audios nor transcripts in log.

Default value is `true`

**For Example**:

<CodeGroup>
  ```javascript logging = true theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      logging: true, // <-- logging = true
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```

  ```javascript logging = false theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      logging: false, // <-- logging = false
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```
</CodeGroup>

### `punctuate`

It will enable punctuation and capitalisation in the transcript. The values it can take are `true` and `false`. Supported languages are: `en`, `hi`. Default value is true

**For Example**:

<CodeGroup>
  ```javascript punctuate = true theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      punctuate: true, // <-- punctuate = true
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```

  ```javascript punctuate = false theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      punctuate: false, // <-- punctuate = false
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```
</CodeGroup>

### `continuous`

It will enable continuous decoding even after silence is detected. Can take value `true`/`1` or `false`/`0`. Default value is `false`/`0`

**For Example**:

<CodeGroup>
  ```javascript continuous = true theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      continuous: true, // <-- continuous = true
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```

  ```javascript continuous = false theme={null}
  const initGenericSTT = async () => {
    const config = {
      apikey: <YOUR-API-KEY>,
      appId: <YOUR-APP-ID>,
      language: 'hi',
      continuous: false, // <-- continuous = false
      eventHandler: (event) => voiceText(event),
      errorHandler: (error) => console.log('Generic STT Error:', error),
    };

    await window.stt_stream.initSTT(config);
  };
  ```
</CodeGroup>
