Chirp 2:提高了多语言准确性

Chirp 2 是 Google 最新一代多语言 ASR 专用模型,旨在根据用户反馈和体验满足用户需求。它在准确率和速度方面都优于原始 Chirp 模型,还扩展增加了字词级时间戳、模型自适应和语音翻译等关键新功能。

试用 Colab 笔记本 在 GitHub 上查看笔记本

模型详情

Chirp 2 仅在 Speech-to-Text API V2 中提供。

模型标识符

您可以像使用任何其他模型一样使用 Chirp 2,只需在使用 API 时在识别请求中指定相应的模型标识符,或在 Google Cloud 控制台中时指定模型名称即可。

型号 型号标识符
Chirp 2 chirp_2

API 方法

由于 Chirp 2 仅在 Speech-to-Text API V2 中提供,因此它支持以下识别方法:

型号 型号标识符 语言支持
V2 Speech.StreamingRecognize(非常适合流式传输和实时音频) 受限*
V2 Speech.Recognize(非常适合短于 1 分钟的短音频) 与 Chirp 相当
V2 Speech.BatchRecognize(适合 1 分钟到 8 小时的长音频) 与 Chirp 相当

*您可以随时使用地理位置 API 查找每种转写模型支持的最新语言和功能列表。

区域可用性

以下地区支持 Chirp 2:

Google Cloud 可用区 发布就绪情况
us-central1 GA
europe-west4 GA
asia-southeast1 GA

您可以随时使用此处所述的地理位置 API 找到每种转写模型的最新受支持的 Google Cloud 区域、语言和功能列表

转写功能的语言支持情况

Chirp 2 支持 StreamingRecognizeRecognizeBatchRecognize 识别方法中的转写。不过,语言支持情况因所用方法而异。具体来说,BatchRecognize 提供最广泛的语言支持StreamingRecognize 支持以下语言:

语言 BCP-47 代码
简体中文 cmn-Hans-CN
繁体中文 cmn-Hant-TW
中文、粤语(香港繁体) yue-Hant-HK
英语(澳大利亚) en-AU
英语(印度) en-IN
英语(英国) en-GB
英语(美国) en-US
法语(加拿大) fr-CA
法语(法国) fr-FR
德语(德国) de-DE
意大利语(意大利) it-IT
日语(日本) ja-JP
韩语(韩国) ko-KR
葡萄牙语(巴西) pt-BR
西班牙语(西班牙) es-ES
西班牙语(美国) es-US

翻译功能的语言支持情况

以下是语音翻译功能支持的语言。请注意,Chirp 2 在翻译方面的语言支持并不对称。这意味着,虽然我们可以将语言 A 翻译为语言 B,但可能无法将语言 B 翻译为语言 A。语音翻译功能支持以下语言对。

对于目标语言为英语的情况:

源语言 -> 目标语言 源语言代码 -> 目标语言代码
阿拉伯语(埃及)-> 英语 ar-EG -> en-US
阿拉伯语(海湾)-> 英语 ar-x-gulf -> en-US
阿拉伯语(黎凡特)-> 英语 ar-x-levant -> en-US
阿拉伯语(马格里布)-> 英语 ar-x-maghrebi -> en-US
加泰罗尼亚语(西班牙)-> 英语 ca-ES -> en-US
威尔士语(英国)-> 英语 cy-GB -> en-US
德语(德国)-> 英语 de-DE -> en-US
西班牙语(拉丁美洲)-> 英语 es-419 -> en-US
西班牙语(西班牙)-> 英语 es-ES -> en-US
西班牙语(美国)-> 英语 es-US -> en-US
爱沙尼亚语(爱沙尼亚)-> 英语 et-EE -> en-US
法语(加拿大)-> 英语 fr-CA -> en-US
法语(法国)-> 英语 fr-FR -> en-US
波斯语(伊朗)-> 英语 fa-IR -> en-US
印度尼西亚语(印度尼西亚)-> 英语 id-ID -> en-US
意大利语(意大利)-> 英语 it-IT -> en-US
日语(日本)-> 英语 ja-JP -> en-US
拉脱维亚语(拉脱维亚)-> 英语 lv-LV -> en-US
蒙古语(蒙古)-> 英语 mn-MN -> en-US
荷兰语(荷兰)-> 英语 nl-NL -> en-US
葡萄牙语(巴西)-> 英语 pt-BR -> en-US
俄语(俄罗斯)-> 英语 ru-RU -> en-US
斯洛文尼亚语(斯洛文尼亚)-> 英语 sl-SI -> en-US
瑞典语(瑞典)-> 英语 sv-SE -> en-US
泰米尔语(印度)-> 英语 ta-IN -> en-US
土耳其语(土耳其)-> 英语 tr-TR -> en-US
中文(简体,中国)-> 英语 cmn-Hans-CN -> en-US

对于源语言为英语的情况:

源语言 -> 目标语言 源语言代码 -> 目标语言代码
英语 -> 阿拉伯语(埃及) en-US -> ar-EG
英语 -> 阿拉伯语(海湾) en-US -> ar-x-gulf
英语 -> 阿拉伯语(黎凡特) en-US -> ar-x-levant
英语 -> 阿拉伯语(马格里布) en-US -> ar-x-maghrebi
英语 -> 加泰罗尼亚语(西班牙) en-US -> ca-ES
英语 -> 威尔士语(英国) en-US -> cy-GB
英语 -> 德语(德国) en-US -> de-DE
英语 -> 爱沙尼亚语(爱沙尼亚) en-US -> et-EE
英语 -> 波斯语(伊朗) en-US -> fa-IR
英语 -> 印度尼西亚语(印度尼西亚) en-US -> id-ID
英语 -> 日语(日本) en-US -> ja-JP
英语 -> 拉脱维亚语(拉脱维亚) en-US -> lv-LV
英语 -> 蒙古语(蒙古) en-US -> mn-MN
英语 -> 斯洛文尼亚语(斯洛文尼亚) en-US -> sl-SI
英语 -> 瑞典语(瑞典) en-US -> sv-SE
英语 -> 泰米尔语(印度) en-US -> ta-IN
英语 -> 土耳其语(土耳其) en-US -> tr-TR
英语 -> 中文(简体,中国) en-US -> cmn-Hans-CN

功能支持和限制

Chirp 2 支持以下功能:

功能 说明
自动加注标点符号 由模型自动生成,可选择停用。
自动大写 由模型自动生成,可选择停用。
语音自适应(自定义调整) 以简单字词或短语的形式向模型提供提示,以提高特定术语或专有名词的识别准确率。不支持类令牌或自定义类。
字词计时(时间戳) 由模型自动生成,可选择启用。转写质量和速度可能会略有下降。
脏话过滤器 检测脏话并在转写内容中仅返回第一个字母后跟星号(例如 f***)。
与语言无关的音频转写 模型会自动推断出音频文件中所讲的语言,并以最常用的语言进行转写。
特定语言的翻译 模型会自动将所讲语言翻译成目标语言。
强制标准化 如果在请求正文中进行了定义,API 将对特定字词或短语执行字符串替换,以确保转写内容的一致性。
字词级置信度分数 API 会返回一个值,但这不是真正的置信度分数。如果是翻译,则不返回置信度分数。
降噪器和信噪比过滤 在将音频发送到模型之前先对其进行降噪处理。如果信噪比低于指定阈值,则滤除相应音频片段。

Chirp 2 不支持以下功能:

功能 说明
区分 不支持
语言检测 不支持

使用 Chirp 2 转写

了解如何使用 Chirp 2 来满足您的转写和翻译需求。

执行流式语音识别

import os

from google.cloud.speech_v2 import SpeechClient
from google.cloud.speech_v2.types import cloud_speech
from google.api_core.client_options import ClientOptions

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")

def transcribe_streaming_chirp2(
    audio_file: str
) -> cloud_speech.StreamingRecognizeResponse:
    """Transcribes audio from audio file stream using the Chirp 2 model of Google Cloud Speech-to-Text V2 API.

    Args:
        audio_file (str): Path to the local audio file to be transcribed.
            Example: "resources/audio.wav"

    Returns:
        cloud_speech.RecognizeResponse: The response from the Speech-to-Text API V2 containing
        the transcription results.
    """

    # Instantiates a client
    client = SpeechClient(
        client_options=ClientOptions(
            api_endpoint="us-central1-speech.googleapis.com",
        )
    )

    # Reads a file as bytes
    with open(audio_file, "rb") as f:
        content = f.read()

    # In practice, stream should be a generator yielding chunks of audio data
    chunk_length = len(content) // 5
    stream = [
        content[start : start + chunk_length]
        for start in range(0, len(content), chunk_length)
    ]
    audio_requests = (
        cloud_speech.StreamingRecognizeRequest(audio=audio) for audio in stream
    )

    recognition_config = cloud_speech.RecognitionConfig(
        auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(),
        language_codes=["en-US"],
        model="chirp_2",
    )
    streaming_config = cloud_speech.StreamingRecognitionConfig(
        config=recognition_config
    )
    config_request = cloud_speech.StreamingRecognizeRequest(
        recognizer=f"projects/{PROJECT_ID}/locations/us-central1/recognizers/_",
        streaming_config=streaming_config,
    )

    def requests(config: cloud_speech.RecognitionConfig, audio: list) -> list:
        yield config
        yield from audio

    # Transcribes the audio into text
    responses_iterator = client.streaming_recognize(
        requests=requests(config_request, audio_requests)
    )
    responses = []
    for response in responses_iterator:
        responses.append(response)
        for result in response.results:
            print(f"Transcript: {result.alternatives[0].transcript}")

    return responses

执行同步语音识别

import os

from google.cloud.speech_v2 import SpeechClient
from google.cloud.speech_v2.types import cloud_speech
from google.api_core.client_options import ClientOptions

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")

def transcribe_sync_chirp2(
    audio_file: str
) -> cloud_speech.RecognizeResponse:
    """Transcribes an audio file using the Chirp 2 model of Google Cloud Speech-to-Text V2 API.
    Args:
        audio_file (str): Path to the local audio file to be transcribed.
            Example: "resources/audio.wav"
    Returns:
        cloud_speech.RecognizeResponse: The response from the Speech-to-Text API containing
        the transcription results.
    """

    # Instantiates a client
    client = SpeechClient(
        client_options=ClientOptions(
            api_endpoint="us-central1-speech.googleapis.com",
        )
    )

    # Reads a file as bytes
    with open(audio_file, "rb") as f:
        audio_content = f.read()

    config = cloud_speech.RecognitionConfig(
        auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(),
        language_codes=["en-US"],
        model="chirp_2",
    )

    request = cloud_speech.RecognizeRequest(
        recognizer=f"projects/{PROJECT_ID}/locations/us-central1/recognizers/_",
        config=config,
        content=audio_content,
    )

    # Transcribes the audio into text
    response = client.recognize(request=request)

    for result in response.results:
        print(f"Transcript: {result.alternatives[0].transcript}")

    return response

执行批量语音识别

import os

from google.cloud.speech_v2 import SpeechClient
from google.cloud.speech_v2.types import cloud_speech
from google.api_core.client_options import ClientOptions

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")

def transcribe_batch_chirp2(
    audio_uri: str,
) -> cloud_speech.BatchRecognizeResults:
    """Transcribes an audio file from a Google Cloud Storage URI using the Chirp 2 model of Google Cloud Speech-to-Text V2 API.
    Args:
        audio_uri (str): The Google Cloud Storage URI of the input audio file.
            E.g., gs://[BUCKET]/[FILE]
    Returns:
        cloud_speech.RecognizeResponse: The response from the Speech-to-Text API containing
        the transcription results.
    """

    # Instantiates a client
    client = SpeechClient(
        client_options=ClientOptions(
            api_endpoint="us-central1-speech.googleapis.com",
        )
    )

    config = cloud_speech.RecognitionConfig(
        auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(),
        language_codes=["en-US"],
        model="chirp_2",
    )

    file_metadata = cloud_speech.BatchRecognizeFileMetadata(uri=audio_uri)

    request = cloud_speech.BatchRecognizeRequest(
        recognizer=f"projects/{PROJECT_ID}/locations/us-central1/recognizers/_",
        config=config,
        files=[file_metadata],
        recognition_output_config=cloud_speech.RecognitionOutputConfig(
            inline_response_config=cloud_speech.InlineOutputConfig(),
        ),
    )

    # Transcribes the audio into text
    operation = client.batch_recognize(request=request)

    print("Waiting for operation to complete...")
    response = operation.result(timeout=120)

    for result in response.results[audio_uri].transcript.results:
        print(f"Transcript: {result.alternatives[0].transcript}")

    return response.results[audio_uri].transcript

使用 Chirp 2 功能

通过代码示例了解如何使用最新功能:

执行与语言无关的转写

import os

from google.cloud.speech_v2 import SpeechClient
from google.cloud.speech_v2.types import cloud_speech
from google.api_core.client_options import ClientOptions

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")

def transcribe_sync_chirp2_auto_detect_language(
    audio_file: str
) -> cloud_speech.RecognizeResponse:
    """Transcribes an audio file and auto-detect spoken language using Chirp 2.
    Please see https://cloud.google.com/speech-to-text/v2/docs/encoding for more
    information on which audio encodings are supported.
    Args:
        audio_file (str): Path to the local audio file to be transcribed.
            Example: "resources/audio.wav"
    Returns:
        cloud_speech.RecognizeResponse: The response from the Speech-to-Text API containing
        the transcription results.
    """
    # Instantiates a client
    client = SpeechClient(
        client_options=ClientOptions(
            api_endpoint="us-central1-speech.googleapis.com",
        )
    )

    # Reads a file as bytes
    with open(audio_file, "rb") as f:
        audio_content = f.read()

    config = cloud_speech.RecognitionConfig(
        auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(),
        language_codes=["auto"],  # Set language code to auto to detect language.
        model="chirp_2",
    )

    request = cloud_speech.RecognizeRequest(
        recognizer=f"projects/{PROJECT_ID}/locations/us-central1/recognizers/_",
        config=config,
        content=audio_content,
    )

    # Transcribes the audio into text
    response = client.recognize(request=request)

    for result in response.results:
        print(f"Transcript: {result.alternatives[0].transcript}")
        print(f"Detected Language: {result.language_code}")

    return response

执行语音翻译

import os

from google.cloud.speech_v2 import SpeechClient
from google.cloud.speech_v2.types import cloud_speech
from google.api_core.client_options import ClientOptions

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")

def translate_sync_chirp2(
    audio_file: str
) -> cloud_speech.RecognizeResponse:
    """Translates an audio file using Chirp 2.
    Args:
        audio_file (str): Path to the local audio file to be translated.
            Example: "resources/audio.wav"
    Returns:
        cloud_speech.RecognizeResponse: The response from the Speech-to-Text API containing
        the translated results.
    """

    # Instantiates a client
    client = SpeechClient(
        client_options=ClientOptions(
            api_endpoint="us-central1-speech.googleapis.com",
        )
    )

    # Reads a file as bytes
    with open(audio_file, "rb") as f:
        audio_content = f.read()

    config = cloud_speech.RecognitionConfig(
        auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(),
        language_codes=["fr-FR"],  # Set language code to targeted to detect language.
        translation_config=cloud_speech.TranslationConfig(target_language="fr-FR"), # Set target language code.
        model="chirp_2",
    )

    request = cloud_speech.RecognizeRequest(
        recognizer=f"projects/{PROJECT_ID}/locations/us-central1/recognizers/_",
        config=config,
        content=audio_content,
    )

    # Transcribes the audio into text
    response = client.recognize(request=request)

    for result in response.results:
        print(f"Translated transcript: {result.alternatives[0].transcript}")

    return response

启用字词级时间戳

import os

from google.cloud.speech_v2 import SpeechClient
from google.cloud.speech_v2.types import cloud_speech
from google.api_core.client_options import ClientOptions

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")

def transcribe_sync_chirp2_with_timestamps(
    audio_file: str
) -> cloud_speech.RecognizeResponse:
    """Transcribes an audio file using the Chirp 2 model of Google Cloud Speech-to-Text V2 API, providing word-level timestamps for each transcribed word.
    Args:
        audio_file (str): Path to the local audio file to be transcribed.
            Example: "resources/audio.wav"
    Returns:
        cloud_speech.RecognizeResponse: The response from the Speech-to-Text API containing
        the transcription results.
    """

    # Instantiates a client
    client = SpeechClient(
        client_options=ClientOptions(
            api_endpoint="us-central1-speech.googleapis.com",
        )
    )

    # Reads a file as bytes
    with open(audio_file, "rb") as f:
        audio_content = f.read()

    config = cloud_speech.RecognitionConfig(
        auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(),
        language_codes=["en-US"],
        model="chirp_2",
        features=cloud_speech.RecognitionFeatures(
            enable_word_time_offsets=True, # Enabling word-level timestamps
        )
    )

    request = cloud_speech.RecognizeRequest(
        recognizer=f"projects/{PROJECT_ID}/locations/us-central1/recognizers/_",
        config=config,
        content=audio_content,
    )

    # Transcribes the audio into text
    response = client.recognize(request=request)

    for result in response.results:
        print(f"Transcript: {result.alternatives[0].transcript}")

    return response

通过模型自适应提高准确率

import os

from google.cloud.speech_v2 import SpeechClient
from google.cloud.speech_v2.types import cloud_speech
from google.api_core.client_options import ClientOptions

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")

def transcribe_sync_chirp2_model_adaptation(
    audio_file: str
) -> cloud_speech.RecognizeResponse:
    """Transcribes an audio file using the Chirp 2 model with adaptation, improving accuracy for specific audio characteristics or vocabulary.
    Args:
        audio_file (str): Path to the local audio file to be transcribed.
            Example: "resources/audio.wav"
    Returns:
        cloud_speech.RecognizeResponse: The response from the Speech-to-Text API containing
        the transcription results.
    """

    # Instantiates a client
    client = SpeechClient(
        client_options=ClientOptions(
            api_endpoint="us-central1-speech.googleapis.com",
        )
    )

    # Reads a file as bytes
    with open(audio_file, "rb") as f:
        audio_content = f.read()

    config = cloud_speech.RecognitionConfig(
        auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(),
        language_codes=["en-US"],
        model="chirp_2",
        # Use model adaptation
        adaptation=cloud_speech.SpeechAdaptation(
          phrase_sets=[
              cloud_speech.SpeechAdaptation.AdaptationPhraseSet(
                  inline_phrase_set=cloud_speech.PhraseSet(phrases=[
                    {
                        "value": "alphabet",
                    },
                    {
                          "value": "cell phone service",
                    }
                  ])
              )
          ]
        )
    )

    request = cloud_speech.RecognizeRequest(
        recognizer=f"projects/{PROJECT_ID}/locations/us-central1/recognizers/_",
        config=config,
        content=audio_content,
    )

    # Transcribes the audio into text
    response = client.recognize(request=request)

    for result in response.results:
        print(f"Transcript: {result.alternatives[0].transcript}")

    return response

降噪器和信噪比过滤详细信息

denoiser_audio=true 可有效帮助您减少背景音乐或雨声、街道交通声等噪声。请注意,降噪器无法消除背景人声。

您可以设置 snr_threshold=X 来控制转写所需的最低语音响度。这有助于滤除非语音音频或背景噪声,防止结果中出现不必要的文字。snr_threshold 值越高,意味着用户需要更大声地说话,模型才能转写其话语。

信噪比过滤可用于实时流式传输应用场景中,以避免将不必要的声音发送给模型进行转写。此设置的值越高,意味着相对于背景噪声,您的语音音量必须越大才能被发送到转写模型。

snr_threshold 的配置会受到 denoise_audiotrue 还是 false 影响。如果 denoise_audio=true,背景噪声会被移除,这会使语音相对更清晰。音频的整体信噪比会提高。

如果您的应用场景仅涉及用户语音,而无其他人说话,则可以设置 denoise_audio=true 来提高信噪比过滤的灵敏度,这有助于滤除非语音噪声。如果您的应用场景涉及背景人声,并且您想避免转写背景语音,则可考虑设置 denoise_audio=false 并降低信噪比阈值。

以下是建议的信噪比阈值。合理的 snr_threshold 值可以设置为 0 - 1000。值为 0 表示不过滤任何内容,值为 1000 表示过滤所有内容。如果建议的设置不适合您,可微调该值。

音频降噪 信噪比阈值 语音灵敏度
true 10.0
true 20.0
true 40.0
true 100.0 非常低
false 0.5
false 1.0
false 2.0
false 5.0 非常低

启用降噪器和信噪比过滤

import os

from google.cloud.speech_v2 import SpeechClient
from google.cloud.speech_v2.types import cloud_speech
from google.api_core.client_options import ClientOptions

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")

def transcribe_sync_chirp2_with_timestamps(
    audio_file: str
) -> cloud_speech.RecognizeResponse:
    """Transcribes an audio file using the Chirp 2 model of Google Cloud Speech-to-Text V2 API, providing word-level timestamps for each transcribed word.
    Args:
        audio_file (str): Path to the local audio file to be transcribed.
            Example: "resources/audio.wav"
    Returns:
        cloud_speech.RecognizeResponse: The response from the Speech-to-Text API containing
        the transcription results.
    """

    # Instantiates a client
    client = SpeechClient(
        client_options=ClientOptions(
            api_endpoint="us-central1-speech.googleapis.com",
        )
    )

    # Reads a file as bytes
    with open(audio_file, "rb") as f:
        audio_content = f.read()

    config = cloud_speech.RecognitionConfig(
        auto_decoding_config=cloud_speech.AutoDetectDecodingConfig(),
        language_codes=["en-US"],
        model="chirp_2",
        denoiser_config={
            denoise_audio: True,
            # Medium snr threshold
            snr_threshold: 20.0,
        }
    )

    request = cloud_speech.RecognizeRequest(
        recognizer=f"projects/{PROJECT_ID}/locations/us-central1/recognizers/_",
        config=config,
        content=audio_content,
    )

    # Transcribes the audio into text
    response = client.recognize(request=request)

    for result in response.results:
        print(f"Transcript: {result.alternatives[0].transcript}")

    return response

在 Google Cloud 控制台中使用 Chirp 2

  1. 注册 Google Cloud 账号并创建项目。
  2. 前往 Google Cloud 控制台中的语音
  3. 如果该 API 尚未启用,请启用该 API。
  4. 确保您拥有 STT 控制台工作区。如果您没有工作区,则必须创建一个工作区。

    1. 前往“转写”页面,然后点击新建转写

    2. 打开工作区下拉列表,然后点击新建工作区以创建用于转写的工作区。

    3. 创建新工作区导航边栏中,点击浏览

    4. 点击以创建新的存储桶。

    5. 输入存储桶的名称,然后点击继续

    6. 点击创建以创建您的 Cloud Storage 存储桶。

    7. 创建存储桶后,点击选择以选择要使用的存储桶。

    8. 点击创建以完成为 Speech-to-Text API V2 控制台创建工作区的过程。

  5. 对实际音频执行转写。

    Speech-to-text 转写创建页面屏幕截图,其中显示了文件选择或上传。

    新建转写页面中,通过上传(本地上传)或指定现有的 Cloud Storage 文件(云端存储空间)来选择音频文件。

  6. 点击继续以转到“转写”选项

    1. 从您之前创建的识别器中选择您计划用于使用 Chirp 进行识别的口语

    2. 在模型下拉列表中,选择 chirp_2

    3. 识别器下拉列表中,选择新创建的识别器。

    4. 点击提交,使用 chirp_2 运行您的第一个识别请求。

  7. 查看 Chirp 2 转写结果。

    1. 转写页面中,点击转写名称以查看其结果。

    2. 转写详情页面中,查看转写结果,并酌情在浏览器中播放音频。

清理

为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。

  1. Optional: Revoke the authentication credentials that you created, and delete the local credential file.

    gcloud auth application-default revoke
  2. Optional: Revoke credentials from the gcloud CLI.

    gcloud auth revoke

控制台

  • In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  • In the project list, select the project that you want to delete, and then click Delete.
  • In the dialog, type the project ID, and then click Shut down to delete the project.
  • gcloud

  • In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  • In the project list, select the project that you want to delete, and then click Delete.
  • In the dialog, type the project ID, and then click Shut down to delete the project.
  • 后续步骤