# Nova SR

> Enhance muffled 16 kHz speech audio into crystal-clear 48 kHz


## Overview

- **Endpoint**: `https://fal.run/fal-ai/nova-sr`
- **Model ID**: `fal-ai/nova-sr`
- **Category**: audio-to-audio
- **Kind**: inference
**Tags**: speech-enhancements, audio-super-resolution, audio-sr



## Pricing

Your request will cost **$0.0001** per second of audio. For $1, you can enhance 10,000 seconds (~2.7 hours) of audio.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`audio_url`** (`string`, _required_):
  The URL of the audio file to enhance.
  - Examples: "https://v3b.fal.media/files/b/0a8a3f6a/t-FWZPvPXfMa7DOxaTSMw_5MXyNKGcG6x92g8CKQdwe_speech.mp3"

- **`sync_mode`** (`boolean`, _optional_):
  If `True`, the media will be returned as a data URI and the output data won't be available in the request history.
  - Default: `false`

- **`audio_format`** (`AudioFormatEnum`, _optional_):
  The format for the output audio. Default value: `"mp3"`
  - Default: `"mp3"`
  - Options: `"mp3"`, `"aac"`, `"m4a"`, `"ogg"`, `"opus"`, `"flac"`, `"wav"`

- **`bitrate`** (`string`, _optional_):
  The bitrate of the output audio. Default value: `"192k"`
  - Default: `"192k"`



**Required Parameters Example**:

```json
{
  "audio_url": "https://v3b.fal.media/files/b/0a8a3f6a/t-FWZPvPXfMa7DOxaTSMw_5MXyNKGcG6x92g8CKQdwe_speech.mp3"
}
```

**Full Example**:

```json
{
  "audio_url": "https://v3b.fal.media/files/b/0a8a3f6a/t-FWZPvPXfMa7DOxaTSMw_5MXyNKGcG6x92g8CKQdwe_speech.mp3",
  "audio_format": "mp3",
  "bitrate": "192k"
}
```


### Output Schema

The API returns the following output format:

- **`audio`** (`AudioFile`, _required_):
  The enhanced audio file.
  - Examples: {"channels":1,"duration":12.283291666666667,"url":"https://v3b.fal.media/files/b/0a8a3f1a/lTKExJu-R6ZJdnFlpzEeq_TxmNTNhl.mp3","file_name":"lTKExJu-R6ZJdnFlpzEeq_TxmNTNhl.mp3","sample_rate":48000,"content_type":"audio/mpeg","bitrate":"192k"}

- **`timings`** (`NovaSRTimings`, _required_):
  Timings for each step in the pipeline.



**Example Response**:

```json
{
  "audio": {
    "channels": 1,
    "duration": 12.283291666666667,
    "url": "https://v3b.fal.media/files/b/0a8a3f1a/lTKExJu-R6ZJdnFlpzEeq_TxmNTNhl.mp3",
    "file_name": "lTKExJu-R6ZJdnFlpzEeq_TxmNTNhl.mp3",
    "sample_rate": 48000,
    "content_type": "audio/mpeg",
    "bitrate": "192k"
  },
  "timings": {}
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/nova-sr \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "audio_url": "https://v3b.fal.media/files/b/0a8a3f6a/t-FWZPvPXfMa7DOxaTSMw_5MXyNKGcG6x92g8CKQdwe_speech.mp3"
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/nova-sr",
    arguments={
        "audio_url": "https://v3b.fal.media/files/b/0a8a3f6a/t-FWZPvPXfMa7DOxaTSMw_5MXyNKGcG6x92g8CKQdwe_speech.mp3"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/nova-sr", {
  input: {
    audio_url: "https://v3b.fal.media/files/b/0a8a3f6a/t-FWZPvPXfMa7DOxaTSMw_5MXyNKGcG6x92g8CKQdwe_speech.mp3"
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/nova-sr)
- [API Documentation](https://fal.ai/models/fal-ai/nova-sr/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/nova-sr)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
