Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add audio transcription by boolean #1082

Merged
merged 2 commits into from
Jan 6, 2024
Merged

Conversation

Josh-XT
Copy link
Owner

@Josh-XT Josh-XT commented Jan 6, 2024

Add audio transcription by boolean

  • Adding is_m4a_audio and is_wav_audio booleans to the Interactions.run function. If the user_input is passed in as base64 audio, you can set the flag of which type of audio it is and it will automatically transcribe the audio.
  • Both new flags are optional and default set to False.

Example of M4A audio transcription in prompt.

# base64_audio = "your base64 encoded audio string from your source."

response = self.ApiClient.prompt_agent(
    agent_name=self.agent_name,
    prompt_name="Chat",
    prompt_args={
        "user_input": base64_audio,
        "is_m4a_audio": True,
        "conversation_name": self.conversation_name,
    },
)

@Josh-XT Josh-XT merged commit d0a5290 into main Jan 6, 2024
3 checks passed
@Josh-XT Josh-XT deleted the Add-audio-transcription-by-bool branch January 6, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant