Skip to content

get response in text while using openai real-time #118

Description

@okkanshu

const response = await openai.beta.realtime.sessions.create({ model: 'gpt-4o-realtime-preview-2024-12-17', voice: 'alloy' as const, modalities: ['text'] as const, // Only text output, no audio input_audio_transcription: { model: 'whisper-1' }, instructions: You are a voice navigation assistant. When users speak, you must respond with the exact text they said. Always respond with the transcription of what the user said. Do not add any additional commentary or explanations., output_audio_format: 'g711_ulaw' as const, });

how can we modify this code and what parameters to pass if i want to get response in text instead of audio?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions