Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Text transkribieren
Die Transkribierung konvertiert ein Skript mit nicht lateinischen Buchstaben in ein Skript mit lateinischen Buchstaben. Das Skript mit lateinischen Buchstaben basiert auf der Aussprache der Ausgangssprache. Cloud Translation transkribiert beispielsweise die japanischen Zeichen こんにちは世界 in Kon'nichiwa sekai um.
Informationen dazu, welche Sprachen transkribiert werden können, finden Sie unter Unterstützte Sprachen.
Vorbereitung
Für die Verwendung der Cloud Translation API benötigen Sie ein Projekt, für das die Cloud Translation API aktiviert ist. Außerdem benötigen Sie die entsprechenden Anmeldedaten. Sie können auch Clientbibliotheken für gängige Programmiersprachen installieren, um Aufrufe an die API zu ermöglichen. Weitere Informationen dazu finden Sie auf der Seite Einrichtung.
Text transkribieren
REST
Verwenden Sie die Methode romanizeText, um ein Skript mit nicht lateinischen Buchstaben in ein Skript mit lateinischen Buchstaben zu konvertieren.
Ersetzen Sie diese Werte in den folgenden Anfragedaten:
PROJECT_NUMBER_OR_ID: Die numerische oder alphanumerische ID Ihres Google Cloud-Projekts
LOCATION: die Region, in der Sie diesen Vorgang ausführen möchten. Beispiel: us-central1.
SOURCE_LANGUAGE: der Sprachcode des Quelltextes.
SOURCE_TEXT: Text in der Ausgangssprache zur Transkribierung.
HTTP-Methode und URL:
POST https://translation.googleapis.com/v3/projects/PROJECT_NUMBER_OR_ID/locations/LOCATION:romanizeText
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[],[],null,["# Romanize text\n=============\n\n|\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nRomanization converts non-Latin script to Latin script. The Latin script is\nbased on the pronunciation of the source language. For example,\nCloud Translation romanizes the following Japanese characters `こんにちは世界`\ninto `Kon'nichiwa sekai`.\n\nTo see which languages can be romanized, see [Supported languages](/translate/docs/languages#roman).\n\nBefore you begin\n----------------\n\n\nBefore you can start using the Cloud Translation API, you must have a project that has\nthe Cloud Translation API enabled, and you must have the appropriate credentials. You can\nalso install client libraries for common programming languages to help you make\ncalls to the API. For more information, see the [Setup](/translate/docs/setup) page.\n\n\u003cbr /\u003e\n\nRomanize text\n-------------\n\n### REST\n\nUse the\n[`romanizeText`](/translate/docs/reference/rest/v3/projects.locations/romanizeText)\nmethod to convert non-Latin script into Latin script.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_NUMBER_OR_ID\u003c/var\u003e: the numeric or alphanumeric ID of your Google Cloud project\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: Region where you want to run this operation. For example, `us-central1`.\n- \u003cvar translate=\"no\"\u003eSOURCE_LANGUAGE\u003c/var\u003e: The language code of the source text.\n- \u003cvar translate=\"no\"\u003eSOURCE_TEXT\u003c/var\u003e: Text in the source language to romanize.\n\n\nHTTP method and URL:\n\n```\nPOST https://translation.googleapis.com/v3/projects/PROJECT_NUMBER_OR_ID/locations/LOCATION:romanizeText\n```\n\n\nRequest JSON body:\n\n```\n{\n \"source_language_code\": \"SOURCE_LANGUAGE\",\n \"contents\": \"SOURCE_TEXT\"\n}\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"x-goog-user-project: PROJECT_NUMBER_OR_ID\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://translation.googleapis.com/v3/projects/PROJECT_NUMBER_OR_ID/locations/LOCATION:romanizeText\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\"; \"x-goog-user-project\" = \"PROJECT_NUMBER_OR_ID\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://translation.googleapis.com/v3/projects/PROJECT_NUMBER_OR_ID/locations/LOCATION:romanizeText\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"romanizations\": [\n {\n \"romanizedText\": \"ROMANIZED_TEXT\"\n }\n ]\n}\n```\n\n\u003cbr /\u003e\n\nWhat's next\n-----------\n\n- Romanization is priced per character sent. For more information, see [Pricing](/translate/pricing)."]]