Skip to content
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

Limited number of characters to 2000 when using "ssml" speech and request error "Invalid SSML" #35

Open
sylarlocke opened this issue Aug 24, 2022 · 0 comments

Comments

@sylarlocke
Copy link

sylarlocke commented Aug 24, 2022

Hello, I have been using the library and it works correctly, but when I try to apply the TextToSpeech::ssml() method if there is more than 2000 characters (I have verified it and the error is due to the characters) it throws me the following error message:
http://prntscr.com/1JW3E4ZRCp-d

The thing is that without using "ssml" I don't have any character limits, or at least for now.

*The tags open <"speak"> and close <"/speak"> are added without quote, but are removed by the code editor adding it here on Github.

$text_polly = '<"speak">I add text here...<amazon:effect vocal-tract-length="+18%"> Vocal tract change!</amazon:effect>up to 2000 characters or less does not give an error, but more 2000 characters show error message<"/speak">';

$voice = 'Lucia';
$language = 'es-ES';
$options = ['voice' => $voice];
$path = TextToSpeech::language($language);
$path = TextToSpeech::ssml()->saveTo('/mp3/en/test-ssml')->convert($text_polly, $options);

I have been testing on the Amazon Polly AWS page and there it works for me to add more than 2000 characters.

Could it be limited in the API itself?

Originally posted by @sylarlocke in #34

@sylarlocke sylarlocke changed the title Hello, I have been using the library and it works correctly, but when I try to apply the TextToSpeech::ssml() method if there is more than 2000 characters (I have verified it and the error is due to the characters) it throws me the following error message: Limited number of characters to 2000 when using "ssml" speech and request error "Invalid SSML" Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant