#Hi, voice clarity is not good as compared to your website tool in API. same audio quality is not
1 messages · Page 1 of 1 (latest)
It seems like you're experiencing a discrepancy in voice quality between the API and the website interface. This issue might be due to text normalization, which is applied on the website but not through the API. Here are a few suggestions to help improve the quality:
-
Text Normalization: Consider rewriting units of measurement or numbers as plain text when using the API, as this can help with pronunciation issues.
-
Endpoint Usage: If you're using the Streaming endpoint, try switching to the standard Text to Speech endpoint, as there might be normalization issues with numbers in the Streaming endpoint.
-
Voice Selection: Test with a different voice, especially if you're using a specific language like Turkish, to see if that improves the quality.
-
Settings and Models: Ensure that you are using the same model and settings in both the API and the website. Double-check your API request to confirm this.
If the issue persists, please provide more details about your API request or any specific examples, and we can look into it further.
I am using attached code,
It seems like you're experiencing a discrepancy in voice quality between the API and the website tool. This issue might be related to text normalization, which is applied on the website but not through the API. Here are a few suggestions to help improve the audio quality:
-
Text Normalization: Try rewriting any units of measurement or numbers as plain text in your API requests. This can help with pronunciation issues.
-
Endpoint Selection: If you're using the Streaming endpoint, consider switching to the standard Text to Speech endpoint, as there might be normalization issues with numbers in the Streaming endpoint.
-
Voice and Settings: Test with a different voice or adjust the settings such as Stability, Clarity, Style, and Speaker boost to see if it improves the quality.
If the issue persists, please provide more details about the specific voice and settings you're using, and any audio examples if possible. This will help in troubleshooting further.
how to do "Text Normalization" in c#
The discrepancy in voice clarity between the API and the website tool is due to text normalization, which is applied on the website but not through the API. To achieve similar results using the API, you can manually implement text normalization in your C# code. Here's a basic example of how you might approach this:
using System;
using System.Text.RegularExpressions;
public class TextNormalizer
{
public static string NormalizeText(string input)
{
// Example: Convert units of measurement to words
input = Regex.Replace(input, @"\b(\d+)\s?kg\b", "$1 kilograms");
input = Regex.Replace(input, @"\b(\d+)\s?m\b", "$1 meters");
// Add more normalization rules as needed
return input;
}
}
class Program
{
static void Main()
{
string text = "The package weighs 5 kg and is 2 m long.";
string normalizedText = TextNormalizer.NormalizeText(text);
Console.WriteLine(normalizedText);
}
}
This example converts "kg" to "kilograms" and "m" to "meters." You can expand this with additional rules to suit your needs. By normalizing the text before sending it to the API, you should achieve better voice clarity similar to the website tool.
but I am using Speech-to-Speech conversion API
To improve the quality of Speech-to-Speech conversion, consider the following tips:
- Similarity Level: Set the Similarity level between 90-95% for optimal results.
- Speaker Boost: Ensure that Speaker Boost is enabled to enhance the clarity of the output.
- Multilingual STS Model: Use the Multilingual STS model, even for English audio, to reduce mispronunciations.
These adjustments should help improve the quality of your Speech-to-Speech conversions. If you continue to experience issues, please provide more details or reach out for further assistance.
please provide me Multilingual STS Model