# Integration with Pixel Streaming

{% hint style="info" %}
To setup the Pixel Streaming server, we recommend taking a look over [this excellent guide](https://github.com/TensorWorks/PixelStreamingCloudGuide/blob/main/Pixel%20Streaming%20UE5.md).
{% endhint %}

1. Ensure you have the latest Convai 3.1.0 plugin or later.
2. Enable Unreal Engine's `Pixel Streaming` and the `Pixel Streaming Player` Plugins from the Plugins window.<br>

   <figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FW2YTsOSE7FyBrR5nNSkk%2Fimage.png?alt=media&#x26;token=542dc8d7-a998-4507-ae76-0e5a781ff093" alt=""><figcaption></figcaption></figure>
3. In the player blueprint which has the Convai Player component, add the PixelStreamingAudio component to the list of components.<br>

   <figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FJybBW4sQ24hwS5QXMpG0%2Fimage.png?alt=media&#x26;token=40cb0b7b-12ee-4b23-89a2-4d11b8b3a430" alt=""><figcaption></figcaption></figure>
4. Click on PixelStreamingAudio component, and in the details panel find Base Submix and choose AudioInput sound submix.<br>

   <figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FbAKxkvsjVlLf6NUB28Wp%2Fimage.png?alt=media&#x26;token=e5f1eb57-3b66-4644-b582-a22afc487c00" alt=""><figcaption></figcaption></figure>
5. On Begin Play in the event graph, add the following blueprint function to initialize Pixel Streaming with the Player Component.

<figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FG3yYUIh873gSkL1YVHeb%2Fimage.png?alt=media&#x26;token=4312fa20-4298-4bea-b815-edcf71eb4398" alt=""><figcaption></figcaption></figure>

<div data-full-width="false"><figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FkATjpgpwMSwHTLC1Y7E7%2FSetPixelStreamingAudioComponent.png?alt=media&#x26;token=cc118f11-8bdc-49bf-b321-b5c35fe71b24" alt=""><figcaption><p>To Get <em><strong>Set Pixel Streaming Audio Component</strong></em> Node</p></figcaption></figure></div>

{% hint style="info" %}
Now, pixel streaming mic input should be working. However, system microphone will no longer work. To change back and forth to and from system microphone, set Use Pixel Streaming Mic Input to true for enabling pixel streaming microphone and false to enable system microphone. This is found in the ConvaiPlayer component.
{% endhint %}

<figure><img src="https://413558230-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FfuLJnmtCTJW96ejQf1DR%2Fimage.png?alt=media&#x26;token=f334ba0c-2723-4aa6-8155-b0d07199f9f0" alt=""><figcaption></figcaption></figure>
