{"id":68170,"library":"go-texttospeech","title":"Cloud Text-to-Speech","description":"Go client library for Google Cloud Text-to-Speech API, converting text into natural-sounding speech.","status":"active","version":"1.21.0","language":"go","source_language":null,"source_url":null,"tags":["text-to-speech","google-cloud","speech","audio"],"install":[{"cmd":"go get cloud.google.com/go/texttospeech","lang":"bash","label":"Install cloud.google.com/go/texttospeech"}],"dependencies":[],"imports":[{"symbol":"texttospeech","correct":"cloud.google.com/go/texttospeech"}],"quickstart":{"code":"package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\ttexttospeech \"cloud.google.com/go/texttospeech/apiv1\"\n\t\"cloud.google.com/go/texttospeech/apiv1/texttospeechpb\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tclient, err := texttospeech.NewClient(ctx)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer client.Close()\n\n\treq := &texttospeechpb.SynthesizeSpeechRequest{\n\t\tInput: &texttospeechpb.SynthesisInput{InputSource: &texttospeechpb.SynthesisInput_Text{Text: \"Hello\"}},\n\t\tVoice: &texttospeechpb.VoiceSelectionParams{LanguageCode: \"en-US\"},\n\t\tAudioConfig: &texttospeechpb.AudioConfig{AudioEncoding: texttospeechpb.AudioEncoding_MP3},\n\t}\n\tresp, err := client.SynthesizeSpeech(ctx, req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Println(\"Audio content length:\", len(resp.AudioContent))\n}","lang":"go","description":"Synthesizes speech from text using Google Cloud Text-to-Speech."},"warnings":[],"env_vars":null,"search_vec":"'api':16 'audio':32 'client':7 'cloud':1,11,30 'convert':17 'go':6 'googl':10,29 'google-cloud':28 'librari':8 'natur':21 'natural-sound':20 'sound':22 'speech':5,15,23,27,31 'text':3,13,18,25 'text-to-speech':2,12,24","created_at":"2026-06-17T17:46:24.342150+00:00","updated_at":"2026-06-17T17:46:24.342150+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/googleapis/google-cloud-go","github":null,"docs":"https://pkg.go.dev/cloud.google.com/go/texttospeech#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["cloud"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}