You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For text to speech, the Neural2 voices require passing of the full language code (en-GB, en-US, ...) not just the first two letters (en, ...).
Error in `abort_http()`:
! http_400 Requested language code 'en' doesn't match the voice 'en-GB-Neural2-F''s language code 'en-gb'. Either pick a different voice, or change the requested language code to en-gb.
The gl_talk implementation forces the languageCode to be derived from the first two letters of the name parameter, so there's no way to overcome this.
I can submit a fix but there are multiple ways this could be resolved.
a) Check whether name contains "Neural", if so grab first 5 characters for languageCode
b) add parameter to force supplied languageCode parameter force_languageCode = FALSE (?)
Drawback of a) is it requires code updates to the code for every model that requires the full languageCode.
b) doesn't look elegant, but it will never break existing code. Particularly, it can be passed through text2speech::tts_google's ... parameter.
I'd prefer the function never overwrites the languageCode, but that surely is a breaking change.
The text was updated successfully, but these errors were encountered:
For text to speech, the Neural2 voices require passing of the full language code (en-GB, en-US, ...) not just the first two letters (en, ...).
The
gl_talk
implementation forces the languageCode to be derived from the first two letters of thename
parameter, so there's no way to overcome this.I can submit a fix but there are multiple ways this could be resolved.
a) Check whether
name
contains "Neural", if so grab first 5 characters for languageCodeb) add parameter to force supplied languageCode parameter
force_languageCode = FALSE
(?)Drawback of a) is it requires code updates to the code for every model that requires the full languageCode.
b) doesn't look elegant, but it will never break existing code. Particularly, it can be passed through
text2speech::tts_google
's...
parameter.I'd prefer the function never overwrites the languageCode, but that surely is a breaking change.
The text was updated successfully, but these errors were encountered: