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

playground/doc/sdk discrepancy: missing 'nova' voice in completions.create audio voices options #1288

Open
1 task done
superap101 opened this issue Jan 27, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@superap101
Copy link

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

sdv version: 4.80.1

I've been testing in the playground the completion chat audio response.
Among the available voices, there is nova.

Once I've finished setting up the parameters I liked, I've used the code button to get the code to insert in my project.

I get an error here:

const resp = await openai.chat.completions.create({
    messages: chatMessages,
    temperature,
    tools,
    model,
    modalities,
    audio: {voice:"nova", format:"wav"},//  here
})

No overload matches this call.
Overload 1 of 3, '(body: ChatCompletionCreateParamsNonStreaming, options?: RequestOptions | undefined): APIPromise', gave the following error.
Type '"nova"' is not assignable to type '"alloy" | "ash" | "ballad" | "coral" | "echo" | "sage" | "shimmer" | "verse"'.
Overload 2 of 3, '(body: ChatCompletionCreateParamsStreaming, options?: RequestOptions | undefined): APIPromise<Stream>', gave the following error.
Type '"nova"' is not assignable to type '"alloy" | "ash" | "ballad" | "coral" | "echo" | "sage" | "shimmer" | "verse"'.
Overload 3 of 3, '(body: ChatCompletionCreateParamsBase, options?: RequestOptions | undefined): APIPromise<ChatCompletion | Stream<...>>', gave the following error.
Type '"nova"' is not assignable to type '"alloy" | "ash" | "ballad" | "coral" | "echo" | "sage" | "shimmer" | "verse"'.ts(2769)

In the sdk:

/**
 * Parameters for audio output. Required when audio output is requested with
 * `modalities: ["audio"]`.
 * [Learn more](https://platform.openai.com/docs/guides/audio).
 */
export interface ChatCompletionAudioParam {
  /**
   * Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`,
   * or `pcm16`.
   */
  format: 'wav' | 'mp3' | 'flac' | 'opus' | 'pcm16';

  /**
   * The voice the model uses to respond. Supported voices are `ash`, `ballad`,
   * `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`,
   * `echo`, and `shimmer`; these voices are less expressive).
   */
  voice: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
}

I'm not a dev or english native speaker, so my apologies if this report isn't clear or useful.

To Reproduce

Try this in your nodejs project:

const resp = await openai.chat.completions.create({
    messages: chatMessages,
    temperature,
    tools,
    model,
    modalities,
    audio: {voice:"nova", format:"wav"},//  here
})

Code snippets

OS

windows 10

Node version

v20.10.0

Library version

4.80.1

@superap101 superap101 added the bug Something isn't working label Jan 27, 2025
@kwhinnery-openai
Copy link
Contributor

thanks for the report! we will get this sorted - in the meantime, the voice should still work when submitted through the SDK, it will just have a type error you will need to ignore with @ts-expect-error or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants