Làm việc với cấu phần phần mềm

Hướng dẫn này giải thích cách lấy thông tin chi tiết về các cấu phần phần mềm khác nhau của cuộc họp do một hội nghị tạo ra bằng cách sử dụng API REST của Google Meet.

Nội dung là một tệp hoặc dữ liệu do Google Meet tạo để phản hồi một hội nghị. Điều này bao gồm cả video và các thành phần khác, chẳng hạn như bản chép lời.

Để tạo dữ liệu, người tham gia phải tạo dữ liệu đó trong Meet trước khi hội nghị kết thúc. Bản chép lời hoạt động độc lập với bản ghi và bạn không cần ghi lại cuộc họp để tạo bản chép lời. Để biết thêm thông tin, hãy xem bài viết Ghi lại cuộc họp videoSử dụng bản chép lời trong Google Meet.

Nếu là chủ sở hữu hoặc người tham gia không gian họp, bạn có thể gọi các phương thức get()list() trên recordings, transcripts và tài nguyên transcripts.entries để truy xuất các cấu phần phần mềm.

Việc xác thực và uỷ quyền bằng thông tin đăng nhập của người dùng cho phép các ứng dụng Google Meet truy cập vào dữ liệu người dùng và thực hiện các thao tác thay mặt cho người dùng đã xác thực. Xác thực bằng tính năng uỷ quyền trên toàn miền cho phép bạn uỷ quyền cho tài khoản dịch vụ của một ứng dụng truy cập vào dữ liệu của người dùng mà không yêu cầu mỗi người dùng phải đồng ý.

Lưu giữ cấu phần phần mềm

Sau khi cuộc họp kết thúc, Meet sẽ lưu bản ghi và bản chép lời vào Google Drive của người tổ chức cuộc họp. Theo mặc định, các cấu phần phần mềm của Meet sẽ được giữ lại theo các quy tắc của Drive.

Các mục trong bản chép lời do Meet REST API cung cấp sẽ bị xoá 30 ngày sau khi hội nghị kết thúc.

Bạn cũng có thể quản lý việc lưu giữ dữ liệu từ Meet riêng biệt bằng cách sử dụng các quy tắc lưu giữ dành riêng cho Meet trong Google Vault. Để biết thêm thông tin, hãy xem bài viết Lưu giữ dữ liệu trên Google Meet bằng Vault.

Bản ghi âm

Các phần sau đây trình bày chi tiết cách lấy thông tin về bản ghi trong bản ghi hội nghị.

Meet có quyền truy cập vào mã bản ghi sau khi tệp bản ghi được tạo. Có thể người dùng sẽ xoá tệp ghi hình khỏi Google Drive, nhưng tên duy nhất vẫn được trả về trong Meet.

Tài nguyên recordings bao gồm cả đối tượng DriveDestinationState.

Đối tượng DriveDestination lưu giữ vị trí xuất trong Drive, nơi bản ghi được lưu dưới dạng tệp MP4. Để tải bản ghi xuống hoặc phát lại bản ghi trong trình duyệt, hãy sử dụng giá trị trường exportUri của đối tượng. Nếu bạn đã quen thuộc với API Google Drive, thì giá trị trường file sẽ tương ứng với id trong tài nguyên files. Để biết thêm thông tin, hãy xem bài viết Tải và xuất tệp.

Đối tượng State lưu giữ trạng thái của phiên ghi hình. Điều này cho phép bạn truy vấn xem bản ghi đã bắt đầu hay chưa, bản ghi đã kết thúc nhưng tệp ghi chưa sẵn sàng hay tệp ghi đã được tạo và sẵn sàng tải xuống.

Xem thông tin chi tiết về bản ghi

Để biết thông tin chi tiết về một bản ghi cụ thể, hãy sử dụng phương thức get() trên tài nguyên recordings bằng tham số đường dẫn name. Nếu không biết tên bản ghi, bạn có thể liệt kê tất cả tên bản ghi bằng phương thức list().

Phương thức này trả về một thực thể của tài nguyên recordings.

Mẫu mã sau đây cho thấy cách truy xuất một bản ghi cụ thể:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/getrecording/AsyncGetRecording.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.GetRecordingRequest;
import com.google.apps.meet.v2.Recording;
import com.google.apps.meet.v2.RecordingName;

public class AsyncGetRecording {

  public static void main(String[] args) throws Exception {
    asyncGetRecording();
  }

  public static void asyncGetRecording() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      GetRecordingRequest request =
          GetRecordingRequest.newBuilder()
              .setName(RecordingName.of("[CONFERENCE_RECORD]", "[RECORDING]").toString())
              .build();
      ApiFuture<Recording> future =
          conferenceRecordsServiceClient.getRecordingCallable().futureCall(request);
      // Do something.
      Recording response = future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.get_recording.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Resource name of the recording.
 */
// const name = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callGetRecording() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const response = await meetClient.getRecording(request);
  console.log(response);
}

callGetRecording();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_get_recording_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_get_recording():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.GetRecordingRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_recording(request=request)

    # Handle the response
    print(response)

Thay thế tên bản ghi bằng tên của mã bản ghi cụ thể trong bản ghi hội nghị.

Liệt kê tất cả bản ghi

Để liệt kê thông tin chi tiết về tất cả bản ghi trong bản ghi hội nghị, hãy sử dụng phương thức list() trên tài nguyên recordings bằng tham số đường dẫn parent. Định dạng: conferenceRecords/{conferenceRecord}.

Phương thức này trả về danh sách bản ghi hội nghị, được sắp xếp theo startTime theo thứ tự tăng dần, dưới dạng một thực thể của tài nguyên recordings. Để điều chỉnh kích thước trang, hãy xem phần Tuỳ chỉnh phân trang .

Mẫu mã sau đây cho biết cách liệt kê tất cả bản ghi trong một bản ghi hội nghị:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/listrecordings/AsyncListRecordings.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordName;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.ListRecordingsRequest;
import com.google.apps.meet.v2.Recording;

public class AsyncListRecordings {

  public static void main(String[] args) throws Exception {
    asyncListRecordings();
  }

  public static void asyncListRecordings() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      ListRecordingsRequest request =
          ListRecordingsRequest.newBuilder()
              .setParent(ConferenceRecordName.of("[CONFERENCE_RECORD]").toString())
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .build();
      ApiFuture<Recording> future =
          conferenceRecordsServiceClient.listRecordingsPagedCallable().futureCall(request);
      // Do something.
      for (Recording element : future.get().iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.list_recordings.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Format: `conferenceRecords/{conference_record}`
 */
// const parent = 'abc123'
/**
 *  Maximum number of recordings to return. The service might return fewer
 *  than this value.
 *  If unspecified, at most 10 recordings are returned.
 *  The maximum value is 100; values above 100 are coerced to 100.
 *  Maximum might change in the future.
 */
// const pageSize = 1234
/**
 *  Page token returned from previous List Call.
 */
// const pageToken = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callListRecordings() {
  // Construct request
  const request = {
    parent,
  };

  // Run request
  const iterable = meetClient.listRecordingsAsync(request);
  for await (const response of iterable) {
      console.log(response);
  }
}

callListRecordings();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_list_recordings_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_list_recordings():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.ListRecordingsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_recordings(request=request)

    # Handle the response
    async for response in page_result:
        print(response)

Thay thế giá trị mẹ bằng tên của bản ghi hội nghị.

Bản chép lời

Các phần sau đây trình bày chi tiết cách lấy thông tin về bản chép lời hội nghị trong bản ghi hội nghị.

Meet có quyền truy cập vào mã nhận dạng bản chép lời sau khi dữ liệu bản chép lời được tạo. Có thể người dùng sẽ xoá tệp bản chép lời khỏi Drive, nhưng tên duy nhất vẫn được trả về trong Meet.

Tài nguyên transcripts bao gồm cả đối tượng DocsDestinationState.

Đối tượng DocsDestination lưu giữ vị trí xuất trong Drive, nơi lưu tệp bản chép lời của Google Tài liệu. Để tìm nạp nội dung hoặc duyệt xem bản chép lời trong trình duyệt, hãy sử dụng giá trị trường exportUri của đối tượng. Nếu bạn quen thuộc với API Google Tài liệu, thì giá trị trường document sẽ tương ứng với documentId trong tài nguyên documents.

Đối tượng State lưu giữ trạng thái của phiên chép lời. Điều này cho phép bạn truy vấn xem phiên chép lời đã bắt đầu hay chưa, phiên chép lời đã kết thúc nhưng tệp bản chép lời chưa sẵn sàng hay tệp bản chép lời đã được tạo và sẵn sàng tải xuống.

Xem thông tin chi tiết về bản chép lời

Để biết thông tin chi tiết về một bản chép lời cụ thể, hãy sử dụng phương thức get() trên tài nguyên transcripts bằng tham số đường dẫn name. Nếu không biết tên bản chép lời, bạn có thể liệt kê tất cả tên bản chép lời bằng phương thức list().

Phương thức này trả về một thực thể của tài nguyên transcripts.

Mẫu mã sau đây cho biết cách truy xuất một bản chép lời cụ thể:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/gettranscript/AsyncGetTranscript.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.GetTranscriptRequest;
import com.google.apps.meet.v2.Transcript;
import com.google.apps.meet.v2.TranscriptName;

public class AsyncGetTranscript {

  public static void main(String[] args) throws Exception {
    asyncGetTranscript();
  }

  public static void asyncGetTranscript() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      GetTranscriptRequest request =
          GetTranscriptRequest.newBuilder()
              .setName(TranscriptName.of("[CONFERENCE_RECORD]", "[TRANSCRIPT]").toString())
              .build();
      ApiFuture<Transcript> future =
          conferenceRecordsServiceClient.getTranscriptCallable().futureCall(request);
      // Do something.
      Transcript response = future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.get_transcript.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Resource name of the transcript.
 */
// const name = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callGetTranscript() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const response = await meetClient.getTranscript(request);
  console.log(response);
}

callGetTranscript();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_get_transcript_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_get_transcript():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.GetTranscriptRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_transcript(request=request)

    # Handle the response
    print(response)

Thay thế tên bản chép lời bằng tên của mã nhận dạng bản chép lời cụ thể trong bản ghi hội nghị.

Liệt kê tất cả bản chép lời

Để liệt kê thông tin chi tiết về tất cả bản chép lời trong bản ghi hội nghị, hãy sử dụng phương thức list() trên tài nguyên transcripts bằng tham số đường dẫn parent. Định dạng: conferenceRecords/{conferenceRecord}.

Phương thức này trả về một danh sách bản chép lời cuộc họp, được sắp xếp theo startTime theo thứ tự tăng dần, dưới dạng một thực thể của tài nguyên transcripts. Để điều chỉnh kích thước trang, hãy xem phần Tuỳ chỉnh phân trang .

Mẫu mã sau đây cho biết cách liệt kê tất cả bản chép lời trong bản ghi hội nghị:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/listtranscripts/AsyncListTranscripts.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordName;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.ListTranscriptsRequest;
import com.google.apps.meet.v2.Transcript;

public class AsyncListTranscripts {

  public static void main(String[] args) throws Exception {
    asyncListTranscripts();
  }

  public static void asyncListTranscripts() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      ListTranscriptsRequest request =
          ListTranscriptsRequest.newBuilder()
              .setParent(ConferenceRecordName.of("[CONFERENCE_RECORD]").toString())
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .build();
      ApiFuture<Transcript> future =
          conferenceRecordsServiceClient.listTranscriptsPagedCallable().futureCall(request);
      // Do something.
      for (Transcript element : future.get().iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.list_transcripts.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Format: `conferenceRecords/{conference_record}`
 */
// const parent = 'abc123'
/**
 *  Maximum number of transcripts to return. The service might return fewer
 *  than this value.
 *  If unspecified, at most 10 transcripts are returned.
 *  The maximum value is 100; values above 100 are coerced to 100.
 *  Maximum might change in the future.
 */
// const pageSize = 1234
/**
 *  Page token returned from previous List Call.
 */
// const pageToken = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callListTranscripts() {
  // Construct request
  const request = {
    parent,
  };

  // Run request
  const iterable = meetClient.listTranscriptsAsync(request);
  for await (const response of iterable) {
      console.log(response);
  }
}

callListTranscripts();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_list_transcripts_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_list_transcripts():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.ListTranscriptsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_transcripts(request=request)

    # Handle the response
    async for response in page_result:
        print(response)

Thay thế giá trị mẹ bằng tên của bản ghi hội nghị.

Mục trong bản chép lời

Các phần sau đây trình bày chi tiết cách lấy lời nói của từng người tham gia dưới dạng các mục trong bản chép lời trong phiên chép lời hội nghị.

Mục bản chép lời chứa văn bản được chép lời từ giọng nói của người tham gia, tối đa 10.000 từ. Văn bản nói languageCode (ví dụ: en-US) cũng được đưa vào dưới dạng cú pháp IETF BCP 47.

Mỗi mục nhập bản chép lời được kết nối với một tên participant trong hội nghị. Để truy xuất thông tin chi tiết về người tham gia, hãy xem phần Lấy thông tin chi tiết về người tham gia.

Dữ liệu về nội dung nhập trong bản chép lời sẽ có sẵn trong 30 ngày sau khi hội nghị kết thúc.

Xin lưu ý rằng các mục bản chép lời do Meet REST API trả về có thể không khớp với bản chép lời trong tệp bản chép lời của Tài liệu. Điều này xảy ra khi tệp bản chép lời được sửa đổi sau khi tạo.

Xem thông tin chi tiết về một mục trong bản chép lời

Để biết thông tin chi tiết về một mục phụ đề cụ thể, hãy sử dụng phương thức get() trên tài nguyên transcripts.entries bằng tham số đường dẫn name. Nếu không biết tên mục phụ đề, bạn có thể liệt kê tất cả tên phụ đề bằng phương thức list().

Phương thức này trả về một thực thể của tài nguyên transcripts.entries.

Mẫu mã sau đây cho biết cách truy xuất một mục nhập bản chép lời cụ thể:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/gettranscriptentry/AsyncGetTranscriptEntry.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.GetTranscriptEntryRequest;
import com.google.apps.meet.v2.TranscriptEntry;
import com.google.apps.meet.v2.TranscriptEntryName;

public class AsyncGetTranscriptEntry {

  public static void main(String[] args) throws Exception {
    asyncGetTranscriptEntry();
  }

  public static void asyncGetTranscriptEntry() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      GetTranscriptEntryRequest request =
          GetTranscriptEntryRequest.newBuilder()
              .setName(
                  TranscriptEntryName.of("[CONFERENCE_RECORD]", "[TRANSCRIPT]", "[ENTRY]")
                      .toString())
              .build();
      ApiFuture<TranscriptEntry> future =
          conferenceRecordsServiceClient.getTranscriptEntryCallable().futureCall(request);
      // Do something.
      TranscriptEntry response = future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.get_transcript_entry.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Resource name of the `TranscriptEntry`.
 */
// const name = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callGetTranscriptEntry() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const response = await meetClient.getTranscriptEntry(request);
  console.log(response);
}

callGetTranscriptEntry();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_get_transcript_entry_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_get_transcript_entry():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.GetTranscriptEntryRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_transcript_entry(request=request)

    # Handle the response
    print(response)

Thay thế tên mục nhập bản chép lời bằng tên của mã nhận dạng mục nhập bản chép lời cụ thể trong bản chép lời.

Liệt kê tất cả mục trong bản chép lời

Để liệt kê thông tin chi tiết về tất cả mục trong bản chép lời, hãy sử dụng phương thức list() trên tài nguyên transcripts.entries bằng tham số đường dẫn parent. Định dạng: conferenceRecords/{conferenceRecord}/transcripts/{transcript}.

Phương thức này trả về một danh sách các mục bản chép lời có cấu trúc cho mỗi bản chép lời hội nghị, được sắp xếp theo startTime theo thứ tự tăng dần, dưới dạng một thực thể của tài nguyên transcripts.entries. Để điều chỉnh kích thước trang, hãy xem phần Tuỳ chỉnh phân trang .

Mã mẫu sau đây cho biết cách liệt kê tất cả các mục trong bản chép lời:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/listtranscriptentries/AsyncListTranscriptEntries.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.ListTranscriptEntriesRequest;
import com.google.apps.meet.v2.TranscriptEntry;
import com.google.apps.meet.v2.TranscriptName;

public class AsyncListTranscriptEntries {

  public static void main(String[] args) throws Exception {
    asyncListTranscriptEntries();
  }

  public static void asyncListTranscriptEntries() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      ListTranscriptEntriesRequest request =
          ListTranscriptEntriesRequest.newBuilder()
              .setParent(TranscriptName.of("[CONFERENCE_RECORD]", "[TRANSCRIPT]").toString())
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .build();
      ApiFuture<TranscriptEntry> future =
          conferenceRecordsServiceClient.listTranscriptEntriesPagedCallable().futureCall(request);
      // Do something.
      for (TranscriptEntry element : future.get().iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.list_transcript_entries.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Format:
 *  `conferenceRecords/{conference_record}/transcripts/{transcript}`
 */
// const parent = 'abc123'
/**
 *  Maximum number of entries to return. The service might return fewer than
 *  this value.
 *  If unspecified, at most 10 entries are returned.
 *  The maximum value is 100; values above 100 are coerced to 100.
 *  Maximum might change in the future.
 */
// const pageSize = 1234
/**
 *  Page token returned from previous List Call.
 */
// const pageToken = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callListTranscriptEntries() {
  // Construct request
  const request = {
    parent,
  };

  // Run request
  const iterable = meetClient.listTranscriptEntriesAsync(request);
  for await (const response of iterable) {
      console.log(response);
  }
}

callListTranscriptEntries();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_list_transcript_entries_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_list_transcript_entries():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.ListTranscriptEntriesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_transcript_entries(request=request)

    # Handle the response
    async for response in page_result:
        print(response)

Thay thế giá trị mẹ bằng tên của bản ghi hội nghị và tên bản chép lời.

Tuỳ chỉnh tính năng phân trang

Truyền các tham số truy vấn sau để tuỳ chỉnh việc phân trang bản ghi, bản chép lời và mục nhập bản chép lời:

  • pageSize: Số lượng tối đa mặt hàng cần trả lại. Dịch vụ có thể trả về ít hơn giá trị này. Nếu không chỉ định, tối đa 10 mục sẽ được trả về. Giá trị tối đa là 100; các giá trị lớn hơn 100 sẽ tự động được thay đổi thành 100.

  • pageToken: Mã thông báo trang, nhận được từ một lệnh gọi danh sách trước đó. Cung cấp mã thông báo này để truy xuất trang tiếp theo.