0

I try to use Speech Transcription via Video Inteligence, however I get the following error :

input_uri: "/supereye1.appspot.com/video/8rsxVe23pzQ/videofile.mp4"
error {
  code: 3
  message: "Invalid SpeechTranscription request argument(s)."
}
segment {
  start_time_offset {
  }
  end_time_offset {
    nanos: 673378000
  }
}

Here is my code :

video_client = videointelligence.VideoIntelligenceServiceClient()
features = [videointelligence.enums.Feature.OBJECT_TRACKING,
            videointelligence.enums.Feature.TEXT_DETECTION,
            videointelligence.enums.Feature.SPEECH_TRANSCRIPTION,
            videointelligence.enums.Feature.SHOT_CHANGE_DETECTION]
operation = video_client.annotate_video(gs_video_path, features=features)

How can I fix this problem ?

london_utku
  • 1,070
  • 2
  • 16
  • 36
  • Try replacing your last line of code with `operation = video_client.annotate_video(input_uri=gs_video_path, features=features)` – rmesteves Jan 22 '21 at 15:58

1 Answers1

0

The following settings are prerequisite for Speech Transcription with Google Cloud.

Now, I set them, prior to the call and I can succesfully execute the video intelligence call.

config = videointelligence.types.SpeechTranscriptionConfig(
    language_code = "en-GB",
    enable_automatic_punctuation=True,
)
context = videointelligence.types.VideoContext(
    segments=None,
    speech_transcription_config=config,
)
london_utku
  • 1,070
  • 2
  • 16
  • 36
  • Did you get a result for all the features present? I get the result for only one feature. Any idea what the issue might be? I created a SO question [here](https://stackoverflow.com/questions/75499653/google-cloud-video-intelligence-cant-annotate-multiple-features) – Chukwuma Nwaugha Feb 19 '23 at 11:55