def _GetProcessedTranscripts()

in utils/import_conversations_v2.py [0:0]


def _GetProcessedTranscripts(project_id):
  """Returns transcripts uri which are processed.

  Args:
      project_id: GCP Project Id

  Returns:
      transcripts: Transcripts uri which are processed
  """
  transcripts = []
  request = contact_center_insights_v1.ListConversationsRequest(
      parent=f'projects/{project_id}/locations/us-central1',
  )
  client = contact_center_insights_v1.ContactCenterInsightsClient()
  page_result = client.list_conversations(request=request)
  for response in page_result:
    # print(response.data_source.gcs_source.transcript_uri)
    transcript = response.data_source.gcs_source.transcript_uri
    if transcript not in transcripts:
      transcripts.append(response.data_source.gcs_source.transcript_uri)
  return transcripts