Skip to content

Add timeout configuration for transfers and enhance transcription features #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions fern/assistants/call-analysis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ You can customize the following properties in your assistant's `analysisPlan`:
}
```

### Minimum messages threshold
- Controls when call analysis is triggered based on the number of messages in the conversation.
- **Default:** Analysis runs on every call regardless of message count.
- **Customize:**
```json
{
"minMessagesThreshold": 5
}
```
- **Use case:** Set this to prevent analysis from running on very short calls (e.g., hang-ups or calls with minimal interaction) to save costs and focus analysis on meaningful conversations.

### Combine prompts and rubrics
- You can combine prompts and rubrics for detailed instructions:
```json
Expand Down
72 changes: 69 additions & 3 deletions fern/calls/call-dynamic-transfers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ Dynamic call transfers let your assistant transfer calls to different destinatio
"number": "+14155552671",
"numberE164CheckEnabled": true,
"callerId": "+14155551234",
"extension": "101"
"extension": "101",
"timeout": 30
}
}
```
Expand All @@ -95,7 +96,8 @@ Dynamic call transfers let your assistant transfer calls to different destinatio
"sipUri": "sip:customer-support@domain.com",
"sipHeaders": {
"X-Custom-Header": "value"
}
},
"timeout": 45
}
}
```
Expand All @@ -110,6 +112,70 @@ Dynamic call transfers let your assistant transfer calls to different destinatio
</Step>
</Steps>

## Transfer Timeout Configuration

The `timeout` property allows you to specify how long (in seconds) the system should wait for the transfer destination to answer before considering the transfer failed. This is particularly useful for managing call flow and user experience.

### Timeout Behavior

- **Default timeout**: If no timeout is specified, the system uses a default timeout value
- **Timeout range**: The timeout value should typically be between 10-60 seconds
- **Timeout exceeded**: If the destination doesn't answer within the specified timeout, the call returns to the assistant
- **Immediate answer**: If the destination answers before the timeout, the transfer completes successfully

### Usage Examples

#### Number destination with timeout
```json
{
"destination": {
"type": "number",
"number": "+14155552671",
"message": "Connecting you to our sales team.",
"timeout": 20
}
}
```

#### SIP destination with timeout
```json
{
"destination": {
"type": "sip",
"sipUri": "sip:support@company.com",
"message": "Transferring you to technical support.",
"timeout": 30
}
}
```

### Best Practices for Timeout Configuration

- **Customer service lines**: Use shorter timeouts (15-25 seconds) to avoid long wait times
- **Internal transfers**: Use longer timeouts (30-45 seconds) for internal extensions that may take longer to answer
- **Emergency lines**: Use shorter timeouts (10-15 seconds) with fallback options
- **Automated systems**: Use longer timeouts (45-60 seconds) for IVR systems that may need processing time

### Handling Timeout Scenarios

When a transfer times out, you can implement fallback logic:

```json
{
"destination": {
"type": "number",
"number": "+14155552671",
"message": "Connecting you to our support team.",
"timeout": 25,
"fallbackMessage": "The support team is currently unavailable. Let me help you with your request."
}
}
```

<Note>
The timeout property is optional. If not specified, the system will use the default timeout configured for your account.
</Note>

## Conclusion

Dynamic call transfers empower your assistant to route calls efficiently based on real-time data. By implementing this flow, you can ensure seamless interactions and provide a better experience for your users.
Dynamic call transfers with timeout configuration empower your assistant to route calls efficiently based on real-time data while maintaining control over call flow timing. By implementing transfer timeouts, you can ensure seamless interactions and provide a better experience for your users, even when transfer destinations are unavailable.
62 changes: 59 additions & 3 deletions fern/providers/transcriber/assembly-ai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ subtitle: What is AssemblyAI?
slug: providers/transcriber/assembly-ai
---


**What is AssemblyAI?**

AssemblyAI is a leading provider of AI-driven speech recognition and understanding technologies. Their advanced models enable accurate transcription and analysis of audio data, facilitating applications across various industries.
Expand All @@ -29,6 +28,63 @@ AssemblyAI offers a comprehensive suite of AI-driven tools designed to meet dive

- AssemblyAI's real-time transcription feature enables sub-second latency conversion of speech to text, beneficial for live captioning, customer support, and interactive voice response systems, enhancing user experience and operational efficiency.

## Configuring AssemblyAI Transcriber

To use AssemblyAI as your transcriber provider, configure your assistant with the following settings:

```json
{
"transcriber": {
"provider": "assembly-ai",
"enableUniversalStreamingApi": true
}
}
```

### enableUniversalStreamingApi

The `enableUniversalStreamingApi` property is a new configuration option for AssemblyAI transcriber that allows you to enable their Universal Streaming API. This property is optional and defaults to `false` if not specified.

**When to use:**
- **Enable (`true`)**: Use when you need the most accurate transcription results and can accept slightly higher latency. The Universal Streaming API provides improved accuracy for diverse languages and accents.
- **Disable (`false`)**: Use when you need the lowest possible latency for real-time applications where speed is more critical than maximum accuracy.

**Example configurations:**

**High Accuracy Configuration:**
```json
{
"transcriber": {
"provider": "assembly-ai",
"enableUniversalStreamingApi": true,
"language": "en"
}
}
```

**Low Latency Configuration:**
```json
{
"transcriber": {
"provider": "assembly-ai",
"enableUniversalStreamingApi": false,
"language": "en"
}
}
```

## API Key Configuration

To use AssemblyAI as your transcriber, you'll need to configure your API key:

1. Create an API key in the [AssemblyAI dashboard](https://www.assemblyai.com/app/account)
2. Add your API key in the Vapi dashboard under the "Transcriber Providers" page
3. AssemblyAI errors will now be surfaced in the `endedReason` of `Call`, `ServerMessageEndOfCallReport`, and `ServerMessageStatusUpdate`

<Frame caption="Specify AssemblyAI API keys in the Transcriber Providers page">
<img src="../static/images/changelog/assembly-ai.png" />
</Frame>

**Use Cases for AssemblyAI**

AssemblyAI's versatile technology serves multiple industries, enhancing operations and delivering valuable insights:
Expand All @@ -39,7 +95,7 @@ AssemblyAI's versatile technology serves multiple industries, enhancing operatio

**Media And Content Creation**

- In the media sector, AssemblyAIs speech-to-text solutions are used to transcribe interviews, podcasts, and video content. This makes content searchable, accessible, and easier to manage, enhancing the efficiency of media production workflows.
- In the media sector, AssemblyAI's speech-to-text solutions are used to transcribe interviews, podcasts, and video content. This makes content searchable, accessible, and easier to manage, enhancing the efficiency of media production workflows.

**Innovation and Research:**

Expand All @@ -51,4 +107,4 @@ AssemblyAI's versatile technology serves multiple industries, enhancing operatio

**Integrations and Compatibility**

- AssemblyAI offers a developer-friendly environment with RESTful API access, WebSocket support for real-time applications, SDKs for popular programming languages, detailed documentation and examples, ensuring seamless integration of speech recognition capabilities into existing systems.
- AssemblyAI offers a developer-friendly environment with RESTful API access, WebSocket support for real-time applications, SDKs for popular programming languages, detailed documentation and examples, ensuring seamless integration of speech recognition capabilities into existing systems.
Loading