> For the complete documentation index, see [llms.txt](https://espergames.gitbook.io/feel-speak/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://espergames.gitbook.io/feel-speak/scripting/initialization.md).

# Initialization

How to initialize Feel Speak.

## Initialize

The `Initialize` method establishes a database connection with Feel Speak. This is necessary to call before using Feel Speak's API.

```csharp
FeelSpeak.Initialize();
```

## Recommended Fields

It's recommended to let Feel Speak know what your current player speaker, main camera, and FX audio source are by simply setting the fields.

```csharp
FeelSpeak.activePlayerSpeaker = mySpeaker;
FeelSpeak.mainCamera = myCamera;
FeelSpeak.fxAudioSource = myFxAudioSource;
FeelSpeak.defaultVoiceLineAudioSource = myVoiceLineAudioSource;
```

Alternatively, you can provide the references during initialization.

```csharp
FeelSpeak.Initialize(mySpeaker, myCamera, myAudioSource, myVoiceLineAudioSource);
```

## Terminate

To have the opposite effect of initialize, use `Terminate`. This is useful when Feel Speak's functionality is no longer required, such as when exiting the game or navigating to the main menu. **`Initialize` will need to be called again before working with Feel Speak's API.** This will also clear most static events so ensure your events are being set once again when required.

```csharp
FeelSpeak.Terminate();
```
