Skip to content

Commit

Permalink
Now with More Fenceposts
Browse files Browse the repository at this point in the history
- Did you know? It takes five fenceposts to build out a forty yard fence
  with ten yards in between posts.
  • Loading branch information
phroggster committed Jan 21, 2025
1 parent 0ad27df commit 2b75875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/google-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface SynthesizeTextResponse {
export async function getTTSAudioContent(effect: EffectModel, googleCloudAPIKey: string): Promise<string | null> {
const url = `https://texttospeech.googleapis.com/v1/text:synthesize?key=${googleCloudAPIKey}`;
const getVoiceNameLangCode = (voiceName: string): string => {
const secondHyphenIdx = voiceName.indexOf("-", voiceName.indexOf("-"));
const secondHyphenIdx = voiceName.indexOf("-", voiceName.indexOf("-") + 1);
return voiceName.slice(0, secondHyphenIdx);
};

Expand Down

0 comments on commit 2b75875

Please sign in to comment.