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 của cuộc họp do một hội nghị tạo ra bằng API Google Meet REST.

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

Để tạo nội dung cuộc họp, người tham gia phải tạo nội dung đó 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 phải 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 trên 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 tài nguyên recordings, transcriptstranscripts.entries để truy xuất 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. Việ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 ứ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 ý.

Giữ lại 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 bản chép lời do Meet REST API cung cấp sẽ bị xoá sau 30 ngày kể từ khi cuộc họp kết thúc.

Bạn cũng có thể quản lý việc lưu giữ các cấu phần phần mềm 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 Giữ lại 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 cuộc họp.

Meet có quyền truy cập vào mã bản ghi sau khi tệp bản ghi được tạo. Người dùng có thể xoá tệp ghi lại khỏi Google Drive, nhưng tên riêng biệ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 chứa 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 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 phần Tải xuống và xuất tệp.

Đối tượng State lưu giữ trạng thái của phiên ghi. Điều này cho phép bạn truy vấn xem quá trình ghi đã bắt đầu hay chưa, quá trình 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 với 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ã mẫu sau đây cho biết 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 cuộc họp, hãy sử dụng phương thức list() trên tài nguyên recordings với 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 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 recordings. Để đ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ả bản ghi trong bản ghi cuộc họp:

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ị gốc 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ã bản chép lời sau khi dữ liệu bản chép lời được tạo. Người dùng có thể xoá tệp bản chép lời khỏi Drive, nhưng tên riêng biệ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 chứa vị trí xuất trong Drive nơi lưu tệp bản chép lời trên 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 với 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ã mẫu 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ã 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 cuộc họp, hãy sử dụng phương thức list() trên tài nguyên transcripts với tham số đường dẫn parent. Định dạng: conferenceRecords/{conferenceRecord}.

Phương thức này trả về danh sách 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. Để đ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ả bản chép lời trong bản ghi cuộc họp:

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ị gốc bằng tên của bản ghi hội nghị.

Mục nhập 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 mục nhập bản chép lời trong phiên chép lời hội nghị.

Mục nhập bản chép lời chứa văn bản được chép lời của giọng nói của người tham gia, tối đa là 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 nhập bản chép lời có 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 có trong tệp bản chép lời của Docs. Đ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 bản chép lời

Để biết thông tin chi tiết về một mục 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.entries với tham số đường dẫn name. Nếu không biết tên mục nhập 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 cách sử dụ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ã 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 bản chép lời

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

Phương thức này trả về 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 bản chép lời trong một 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ị gốc bằng tên 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 bản chép lời:

  • pageSize: Số lượng mặt hàng tối đa để trả lại. Dịch vụ có thể trả về ít hơn giá trị này. Nếu không xác định, hệ thống sẽ trả về tối đa 10 mục. 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.