Skip to content

Conversation

@YichongLeng
Copy link
Contributor

Support using waveform as input besides audio path.

Discussion in #124 .

@YichongLeng YichongLeng requested a review from MoyanZitto June 21, 2025 15:33
@YichongLeng YichongLeng self-assigned this Jun 21, 2025
if isinstance(wav_path_or_waveform, str):
wav_tokens = self.audio_tokenizer.tokenize(audio_path=wav_path_or_waveform)
else:
wav_tokens = self.audio_tokenizer.tokenize(speech=wav_path_or_waveform)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这种情况下好像没办法保证wav_path_or_waveform一定sr=16000,如果用错了会有难发现的bug(能正常推但是结果不对)

感觉可以来个org_sr,当wav_path_or_waveform是一个ndarray / tensor的时候,要求同时提供一下这个wavform对应的sr,这样我们可以里面resample一下?

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.

2 participants