Voice speed parameter in the Node.js SDK
# support
a
Greetings team, I am using Vapi's Node.js SDK
"@vapi-ai/server-sdk": "^0.5.0"
. As you can see I am on the latest version. On the dashboard (both Vapi's and ElevenLabs') we get the slider to set speed for a particular voice. I can't see this setting in the SDK. Any easy workaround to this? Thanks! @Shubham Bajaj
v
Hi there! 👋 I've looked into this for you, and unfortunately, Vapi's Node.js SDK version 0.5.0 doesn't support direct voice speed adjustment, even though this feature is available as a slider in both Vapi's and ElevenLabs' dashboards. According to the documentation, users have reported that attempting to set voice speed via the dashboard doesn't affect the settings when using certain APIs like the OpenAI Realtime API [(source)](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339276020389253181). However, there are a couple of workarounds you could try: 1. **Post-processing with ffmpeg**:
Copy code
javascript
const { exec } = require('child_process');

const adjustSpeed = (inputFile, outputFile, speed) => {
  exec(`ffmpeg -i ${inputFile} -filter:a "atempo=${speed}" ${outputFile}`, (error) => {
    if (error) {
      console.error(`Error adjusting speed: ${error}`);
    }
    console.log(`Speed adjusted and output saved to ${outputFile}`);
  });
};

// Example usage
adjustSpeed('input.mp3', 'output.mp3', 0.85); // Slows down audio by 15%
2. Adjust conversation timing parameters (not direct speed control, but affects pace):
Copy code
javascript
const vapiConfig = {
  numWordsToInterruptAssistant: 5,
  maxDurationSeconds: 10
};

// Assume vapi is an initialized instance of your Vapi SDK
vapi.updateSettings(vapiConfig);
I hope one of these approaches helps with your use case! Let me know if you need any clarification. Sources: - [Discord Thread 1](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339276020389253181) - [Discord Thread 2](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334027136305991750)
k
Hey @AKG can you raise this issue over the github, server-sdk team will respond back to you. let me know if no one replies within a day or two.