Skip to content

support for audio resources#298

Open
davidkoski wants to merge 2 commits into
mainfrom
audio-support
Open

support for audio resources#298
davidkoski wants to merge 2 commits into
mainfrom
audio-support

Conversation

@davidkoski
Copy link
Copy Markdown
Collaborator

Proposed changes

This adds the lower level support so that these other PRs can use it.

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

- see #192, #194
- this adds representation of audio in UserInput and LMInput
@davidkoski davidkoski requested a review from angeloskath May 18, 2026 18:06
Comment on lines +17 to +18
/// Array of audio data associated with the message.
public var audios: [UserInput.Audio]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thread audio throughout

public var instructions: String?
private let cache: SerialAccessContainer<Cache>
public var processing: UserInput.Processing
public var audioProcessing: UserInput.AudioProcessing
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And processing parameters

/// Representation of prepared input audio(s).
public struct ProcessedAudio {

public let samples: MLXArray
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

images/video have THW -- we may need something like that here, but we can start with this

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