Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Text-to-Speech adalah API yang didukung oleh teknologi kecerdasan buatan (AI) Google. Anda akan mengirimkan data transkrip ke Text-to-Speech dalam panggilan API,
lalu menerima ucapan manusia sintetis yang terdengar alami sebagai audio yang dapat diputar sebagai
respons. Untuk mengetahui informasi lebih lanjut tentang cara kerja Text-to-Speech, lihat halaman dasar-dasar.
Kami menyediakan contoh kode yang menunjukkan cara
membuat permintaan ke API dan menerima respons. Anda dapat mempelajari cara menggunakan contoh ini dengan mengikuti panduan memulai dan panduan cara kerja Text-to-Speech.
Panduan ini akan menuntun Anda melalui langkah-langkah yang diperlukan untuk mulai mengirim permintaan ke Text-to-Speech API.
Ringkasan
Sebelum dapat mulai menggunakan Text-to-Speech, Anda harus mengaktifkan API di
Google Cloud Platform Console. Langkah-langkah di bawah ini akan memandu Anda melakukan
tindakan berikut:
Aktifkan Text-to-Speech di project.
Pastikan penagihan diaktifkan untuk Text-to-Speech.
Siapkan autentikasi untuk lingkungan pengembangan Anda.
Anda dapat memilih project yang sudah ada atau membuat project baru. Untuk mengetahui detail selengkapnya tentang cara membuat project, lihat dokumentasi Google Cloud Platform.
Jika membuat project baru, Anda akan diminta untuk menautkan akun penagihan ke project ini. Jika menggunakan project yang sudah ada, pastikan Anda telah mengaktifkan penagihan.
Setelah memilih project dan menautkannya ke akun penagihan, Anda dapat mengaktifkan Text-to-Speech API. Buka kotak Search products and resources di bagian atas halaman dan ketik "speech". Pilih Cloud Text-to-Speech API dari daftar hasil.
Untuk mencoba Text-to-Speech tanpa menautkannya ke project Anda, pilih opsi TRY THIS API. Untuk mengaktifkan Text-to-Speech API untuk digunakan
dengan project Anda, klik ENABLE.
Untuk menonaktifkan Text-to-Speech API, buka dasbor Google Cloud Platform Anda, lalu klik link Go to APIs overview di kotak APIs.
Klik Text-to-Speech API, lalu pilih tombol DISABLE API di bagian atas halaman.
Langkah berikutnya
Pelajari cara mengirimkan permintaan transkripsi ke Text-to-Speech API menggunakan
library klien atau
command line.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-02 UTC."],[],[],null,["# Before You Begin\n\nText-to-Speech is an API that is powered by Google's artificial intelligence\n(AI) technology. You send your transcript data to Text-to-Speech in an API\ncall, then receive natural-sounding, synthetic human speech as playable audio in\nresponse. For more information on how Text-to-Speech works, see the\n[basics](/text-to-speech/docs/basics) page.\n\nWe provide [code samples](/text-to-speech/docs/samples) that show you how to\nmake a request to the API and receive a response. You can learn how to use\nthese samples by following the Text-to-Speech\n[quickstarts](/text-to-speech/docs/quickstarts) and\n[how-to guides](/text-to-speech/docs/how-to).\n\nThis guide walks you through the steps necessary to start sending requests to\nthe Text-to-Speech API.\n\nOverview\n--------\n\nBefore you can begin using Text-to-Speech, you must enable the API in the\nGoogle Cloud Platform Console. The steps below walk you through the\nfollowing actions:\n\n- Enable Text-to-Speech on a project.\n- Make sure billing is enabled for Text-to-Speech.\n- Set up authentication for your development environment.\n\nSet up your Google Cloud Platform project\n-----------------------------------------\n\n1. [Sign in to Google Cloud console](https://console.cloud.google.com/)\n\n2. [Go to the project selector page](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n You can either choose an existing project or create a new one. For more\n details about creating a project, please see the\n [Google Cloud Platform documentation](/resource-manager/docs/creating-managing-projects).\n3. If you create a new project, you will be prompted to link a billing account\n to this project. If you are using a pre-existing project, make sure that you\n have billing enabled.\n\n [Learn how to confirm that billing is enabled for your project](/billing/docs/how-to/modify-project)\n | **Note:** You must enable billing to use Text-to-Speech API, however you will not be charged unless you exceed the free quota. See the [pricing](/text-to-speech/pricing) page for more details.\n4. Once you have selected a project and linked it to a billing account, you\n can enable the Text-to-Speech API. Go to the **Search products and\n resources** bar at the top of the page and type in **\"speech\"** . Select the\n **Cloud Text-to-Speech API** from the list of results.\n\n5. To try Text-to-Speech without linking it to your project, choose\n the **TRY THIS API** option. To enable the Text-to-Speech API for use\n with your project, click **ENABLE**.\n\n6. Set up authentication for your development environment. For instructions, see\n [Set up authentication for Text-to-Speech](/text-to-speech/docs/authentication#authn-how-to).\n\nDisable the Text-to-Speech API\n------------------------------\n\nTo disable the Text-to-Speech API, navigate to your Google Cloud Platform\ndashboard and click on the **Go to APIs overview** link in the **APIs** box.\nClick on the Text-to-Speech API, then select the **DISABLE API** button at the top\nof the page.\n\nWhat's next\n-----------\n\nLearn how to send a transcription request to the Text-to-Speech API using\n[client libraries](/text-to-speech/docs/create-audio-text-client-libraries) or the\n[command line](/text-to-speech/docs/create-audio-text-command-line)."]]