# Self-hosting (https://docs.cochl.ai/docs/pro/self-hosting)



You can host Cochl.Sense Pro yourself as a virtual machine (VM) image from [Google Cloud Marketplace (GCP MP)](https://cloud.google.com/marketplace). The image runs Cochl’s sound event detection model on your own VM. The Marketplace listing still uses the product’s earlier name, **Cochl.Sense Cloud API on VM**. This guide provides step-by-step instructions on how to deploy, configure, manage, and delete the VM image.

<Callout type="info">
  The self-hosted VM image exposes **sound event detection only** (legacy `tags[]` / `probability` shape via `POST /inference`). [Speech analysis](https://docs.cochl.ai/docs/pro/speech-analysis) and [audio insights](https://docs.cochl.ai/docs/pro/audio-insights) are available exclusively on the managed Cochl.Sense Pro service.
</Callout>

## 1. How to deploy the VM image [#1-how-to-deploy-the-vm-image]

Follow these steps to deploy the VM image via Google Cloud Marketplace:

1. Sign in to your Google Cloud Platform (GCP) account and go to &#x2A;*Google Cloud Console.**
2. In the search bar, type &#x2A;*“Cochl.Sense Cloud API on VM”** and select it from the results.
3. Click **Launch** to start the deployment process.
4. Configure the VM settings by selecting the appropriate instance type:

* **Minimum requirements:**

  * **Instance type:** `n1-standard-2` (2 vCPUs, 7.5 GB RAM)
  * **GPU:** NVIDIA T4 or higher
  * **Storage:** At least 40 GB of disk space
* **Recommended requirements:**

  * Instance type: `n1-standard-4` (4 vCPUs, 15 GB RAM)

5. Click **Deploy** and wait for the process to complete
6. Once deployed, check the **IP address** or **URL** of the VM to verify successful installation.

## 2. Configuration for the VM image [#2-configuration-for-the-vm-image]

After deploying the VM, complete the configuration steps to start using the API.

### Check deployed resources [#check-deployed-resources]

* Navigate to **Compute Engine > VM Instances** in the Google Cloud Console.
* Ensure the VM is running properly by checking its status.
* It is recommended to wait **1–2 minutes** after initialization before making an API request.

### Configurations [#configurations]

* If needed, configure network and firewall settings to restrict API access to specific IP addresses.
* Test API calls by:
  * Checking &#x2A;*server status:** `curl http://<VM-IP>/health`
  * Sending a sound analysis request — a `multipart/form-data` upload with the audio in `file` and its type in `content_type`:

    ```bash
    curl -X POST http://<VM-IP>/inference \
      -F "file=@testfile.mp3" \
      -F "content_type=audio/mp3"
    ```

    `content_type` is one of `audio/mp3`, `audio/wav`, or `audio/ogg`. For raw PCM, describe the samples instead, e.g. `audio/x-raw; rate=22050; format=s24le; channels=1`.
* For API usage guidance, see [How to request the deployed VM](https://github.com/cochlearai/csp-example-doc/tree/main/gcp#how-to-request-the-deployed-vm).

## 3. Billing management [#3-billing-management]

To monitor your usage and manage billing for the VM image:

1. Go to &#x2A;*Google Cloud Console > Billing.**
2. Click **Transactions** under **Payments** to view your usage details.
3. Download invoices in **CSV or PDF format** if needed.

### Pricing policy [#pricing-policy]

* The VM image is billed on a &#x2A;*monthly basis.**

## 4. Deleting your deployment [#4-deleting-your-deployment]

If you need to stop or delete your VM image deployment:

1. Navigate to &#x2A;*Google Cloud Console > Compute Engine > VM Instances.**
2. Locate the instance you deployed from the **Cochl.Sense Cloud API on VM** listing.
3. Click on the **instance name** to open its details.
4. Click **Delete** at the top of the page.

<Callout type="warn">
  **Important:** Deleting your deployment is irreversible, so ensure that you **back up all necessary data** before proceeding.
</Callout>

## 5. Support [#5-support]

The current engine version of the VM image is **v2.40.0d**.

If you need help with the VM image, these resources and contacts are available:

* **Email support:** [support@cochl.ai](mailto:support@cochl.ai)
* API usage guidance: [How to request the deployed VM](https://github.com/cochlearai/csp-example-doc/tree/main/gcp#how-to-request-the-deployed-vm)
* Supported Sound Categories: [Sound tags list](https://docs.cochl.ai/docs/pro/sound-event-detection/sound-tags)
* Tutorial: [How to deploy and use the VM image on GCP](https://github.com/cochlearai/csp-example-doc/tree/main/gcp)
