zhangxinfd / soundstorm-speechtokenizer Goto Github PK
View Code? Open in Web Editor NEWImplementation of SoundStorm built upon SpeechTokenizer.
License: MIT License
Implementation of SoundStorm built upon SpeechTokenizer.
License: MIT License
Hi, Thanks for your excellent job!
As listed in your repo, by replacing NAR by soundstorm-speechtokenizer, the performance(Speaker Similarity) improved a lot. But when I try the demo on your web page, it is hard to determine the difference with and without SoundStorm.
So I am wondering if the proposed soundstorm-speechtokenizer can improve the failure cases of original USLM?
Thanks a lot in advance, hoping to hear your reply!
Why is this?
Shouldn't this part be following ?
all_mask_num_tokens = all_mask_num_tokens if q < num_full_sampling_levels else torch.zeros((1, batch_size), dtype = torch.long, device = device)
Hi,
How can I get semantic_tokens from input text? Thank you in advance.
Hi, I was trying to inference from the model and it seems like the method generate
in the class SoundStorm is currently genenrate
(with an extra n
after the second e
). Can you fix that? Tks
Are you planning to release trained model weights?
Excuse me, are you planning to release the training code section related to speechtokenizer? This may make our reproduction of the entire work more complete and convincing.
Hello @ZhangXInFD
There is an error running inference, due to shape error in einops
semantic tokens shape: [1, 518]
prompt tokens shape [1, 142, 8]
generated shape: [1, 518, 8]
I am using this prompt and audio files:
prompt: soundstorm-speechtokenizer/samples/Voice Conversion/2078-142845_6345-64257/prompt.wav
audio: soundstorm-speechtokenizer/samples/Voice Conversion/2078-142845_6345-64257/raw.wav
error
rearrange(generated, 'n q -> q b n', b=semantic_tokens.size(0))
EinopsError: Error while processing rearrange-reduction pattern "n q -> q b n".
Input tensor shape: torch.Size([1, 518, 8]). Additional info: {'b': 1}.
Identifiers only on one side of expression (should be on both): {'b'}
@ZhangXInFD Are you simply replaced the 'NAR' of USLM with trained SoundStorm speech tokenizer for zero shot TTS task ?
Although quality of SoundStorm is much better Have you notice any speed advantages while using SoundStorm compare to original USLM ?
from soundstorm_speechtokenizer import SoundStorm, ConformerWrapper
python: python3.10
torch:
pytorchvideo 0.1.5 pypi_0 pypi
torch 2.2.2 pypi_0 pypi
torchaudio 2.2.2 pypi_0 pypi
torchvision 0.17.2 pypi_0 pypi
File "/home/xxx/miniconda3/envs/xxx/lib/python3.10/site-packages/beartype/_util/hint/nonpep/utilnonpeptest.py", line 203, in die_unless_hint_nonpep
raise exception_cls(
beartype.roar.BeartypeDecorHintNonpepException: Method soundstorm_speechtokenizer.soundstorm.ConformerWrapper.init() parameter "conformer" type hint either PEP-noncompliant or currently unsupported by @beartype.
Hi @ZhangXInFD
I get the following error loading the checkpoint
checkpoint SoundStorm_best_dev.pt
command:
from soundstorm_speechtokenizer import SoundStorm, ConformerWrapper
soundstorm.load('/home/ehosseiniasl/models/soundstorm_speechtokenizer/SoundStorm_best_dev.pt')
RuntimeError: Error(s) in loading state_dict for SoundStorm:
Missing key(s) in state_dict: "net.conformer.layers.0.conv.net1.0.weight", "net.conformer.layers.0.conv.net1.0.bias", "net.conformer.layers.0.conv.net1.2.weight", "net.conformer.layers.0.conv.net1.2.bias", "net.conformer.layers.0.conv.ds_conv.conv.weight", "net.conformer.layers.0.conv.ds_conv.conv.bias", "net.conformer.layers.0.conv.net2.1.gamma", "net.conformer.layers.0.conv.net2.2.weight", "net.conformer.layers.0.conv.net2.2.bias", "net.conformer.layers.1.conv.net1.0.weight", "net.conformer.layers.1.conv.net1.0.bias", "net.conformer.layers.1.conv.net1.2.weight", "net.conformer.layers.1.conv.net1.2.bias", "net.conformer.layers.1.conv.ds_conv.conv.weight", "net.conformer.layers.1.conv.ds_conv.conv.bias", "net.conformer.layers.1.conv.net2.1.gamma", "net.conformer.layers.1.conv.net2.2.weight", "net.conformer.layers.1.conv.net2.2.bias", "net.conformer.layers.2.conv.net1.0.weight", "net.conformer.layers.2.conv.net1.0.bias", "net.conformer.layers.2.conv.net1.2.weight", "net.conformer.layers.2.conv.net1.2.bias", "net.conformer.layers.2.conv.ds_conv.conv.weight", "net.conformer.layers.2.conv.ds_conv.conv.bias", "net.conformer.layers.2.conv.net2.1.gamma", "net.conformer.layers.2.conv.net2.2.weight", "net.conformer.layers.2.conv.net2.2.bias", "net.conformer.layers.3.conv.net1.0.weight", "net.conformer.layers.3.conv.net1.0.bias", "net.conformer.layers.3.conv.net1.2.weight", "net.conformer.layers.3.conv.net1.2.bias", "net.conformer.layers.3.conv.ds_conv.conv.weight", "net.conformer.layers.3.conv.ds_conv.conv.bias", "net.conformer.layers.3.conv.net2.1.gamma", "net.conformer.layers.3.conv.net2.2.weight", "net.conformer.layers.3.conv.net2.2.bias", "net.conformer.layers.4.conv.net1.0.weight", "net.conformer.layers.4.conv.net1.0.bias", "net.conformer.layers.4.conv.net1.2.weight", "net.conformer.layers.4.conv.net1.2.bias", "net.conformer.layers.4.conv.ds_conv.conv.weight", "net.conformer.layers.4.conv.ds_conv.conv.bias", "net.conformer.layers.4.conv.net2.1.gamma", "net.conformer.layers.4.conv.net2.2.weight", "net.conformer.layers.4.conv.net2.2.bias", "net.conformer.layers.5.conv.net1.0.weight", "net.conformer.layers.5.conv.net1.0.bias", "net.conformer.layers.5.conv.net1.2.weight", "net.conformer.layers.5.conv.net1.2.bias", "net.conformer.layers.5.conv.ds_conv.conv.weight", "net.conformer.layers.5.conv.ds_conv.conv.bias", "net.conformer.layers.5.conv.net2.1.gamma", "net.conformer.layers.5.conv.net2.2.weight", "net.conformer.layers.5.conv.net2.2.bias", "net.conformer.layers.6.conv.net1.0.weight", "net.conformer.layers.6.conv.net1.0.bias", "net.conformer.layers.6.conv.net1.2.weight", "net.conformer.layers.6.conv.net1.2.bias", "net.conformer.layers.6.conv.ds_conv.conv.weight", "net.conformer.layers.6.conv.ds_conv.conv.bias", "net.conformer.layers.6.conv.net2.1.gamma", "net.conformer.layers.6.conv.net2.2.weight", "net.conformer.layers.6.conv.net2.2.bias", "net.conformer.layers.7.conv.net1.0.weight", "net.conformer.layers.7.conv.net1.0.bias", "net.conformer.layers.7.conv.net1.2.weight", "net.conformer.layers.7.conv.net1.2.bias", "net.conformer.layers.7.conv.ds_conv.conv.weight", "net.conformer.layers.7.conv.ds_conv.conv.bias", "net.conformer.layers.7.conv.net2.1.gamma", "net.conformer.layers.7.conv.net2.2.weight", "net.conformer.layers.7.conv.net2.2.bias", "net.conformer.layers.8.conv.net1.0.weight", "net.conformer.layers.8.conv.net1.0.bias", "net.conformer.layers.8.conv.net1.2.weight", "net.conformer.layers.8.conv.net1.2.bias", "net.conformer.layers.8.conv.ds_conv.conv.weight", "net.conformer.layers.8.conv.ds_conv.conv.bias", "net.conformer.layers.8.conv.net2.1.gamma", "net.conformer.layers.8.conv.net2.2.weight", "net.conformer.layers.8.conv.net2.2.bias", "net.conformer.layers.9.conv.net1.0.weight", "net.conformer.layers.9.conv.net1.0.bias", "net.conformer.layers.9.conv.net1.2.weight", "net.conformer.layers.9.conv.net1.2.bias", "net.conformer.layers.9.conv.ds_conv.conv.weight", "net.conformer.layers.9.conv.ds_conv.conv.bias", "net.conformer.layers.9.conv.net2.1.gamma", "net.conformer.layers.9.conv.net2.2.weight", "net.conformer.layers.9.conv.net2.2.bias", "net.conformer.layers.10.conv.net1.0.weight", "net.conformer.layers.10.conv.net1.0.bias", "net.conformer.layers.10.conv.net1.2.weight", "net.conformer.layers.10.conv.net1.2.bias", "net.conformer.layers.10.conv.ds_conv.conv.weight", "net.conformer.layers.10.conv.ds_conv.conv.bias", "net.conformer.layers.10.conv.net2.1.gamma", "net.conformer.layers.10.conv.net2.2.weight", "net.conformer.layers.10.conv.net2.2.bias", "net.conformer.layers.11.conv.net1.0.weight", "net.conformer.layers.11.conv.net1.0.bias", "net.conformer.layers.11.conv.net1.2.weight", "net.conformer.layers.11.conv.net1.2.bias", "net.conformer.layers.11.conv.ds_conv.conv.weight", "net.conformer.layers.11.conv.ds_conv.conv.bias", "net.conformer.layers.11.conv.net2.1.gamma", "net.conformer.layers.11.conv.net2.2.weight", "net.conformer.layers.11.conv.net2.2.bias".
Unexpected key(s) in state_dict: "net.conformer.layers.0.conv.net.0.weight", "net.conformer.layers.0.conv.net.0.bias", "net.conformer.layers.0.conv.net.2.weight", "net.conformer.layers.0.conv.net.2.bias", "net.conformer.layers.0.conv.net.4.conv.weight", "net.conformer.layers.0.conv.net.4.conv.bias", "net.conformer.layers.0.conv.net.6.gamma", "net.conformer.layers.0.conv.net.7.weight", "net.conformer.layers.0.conv.net.7.bias", "net.conformer.layers.1.conv.net.0.weight", "net.conformer.layers.1.conv.net.0.bias", "net.conformer.layers.1.conv.net.2.weight", "net.conformer.layers.1.conv.net.2.bias", "net.conformer.layers.1.conv.net.4.conv.weight", "net.conformer.layers.1.conv.net.4.conv.bias", "net.conformer.layers.1.conv.net.6.gamma", "net.conformer.layers.1.conv.net.7.weight", "net.conformer.layers.1.conv.net.7.bias", "net.conformer.layers.2.conv.net.0.weight", "net.conformer.layers.2.conv.net.0.bias", "net.conformer.layers.2.conv.net.2.weight", "net.conformer.layers.2.conv.net.2.bias", "net.conformer.layers.2.conv.net.4.conv.weight", "net.conformer.layers.2.conv.net.4.conv.bias", "net.conformer.layers.2.conv.net.6.gamma", "net.conformer.layers.2.conv.net.7.weight", "net.conformer.layers.2.conv.net.7.bias", "net.conformer.layers.3.conv.net.0.weight", "net.conformer.layers.3.conv.net.0.bias", "net.conformer.layers.3.conv.net.2.weight", "net.conformer.layers.3.conv.net.2.bias", "net.conformer.layers.3.conv.net.4.conv.weight", "net.conformer.layers.3.conv.net.4.conv.bias", "net.conformer.layers.3.conv.net.6.gamma", "net.conformer.layers.3.conv.net.7.weight", "net.conformer.layers.3.conv.net.7.bias", "net.conformer.layers.4.conv.net.0.weight", "net.conformer.layers.4.conv.net.0.bias", "net.conformer.layers.4.conv.net.2.weight", "net.conformer.layers.4.conv.net.2.bias", "net.conformer.layers.4.conv.net.4.conv.weight", "net.conformer.layers.4.conv.net.4.conv.bias", "net.conformer.layers.4.conv.net.6.gamma", "net.conformer.layers.4.conv.net.7.weight", "net.conformer.layers.4.conv.net.7.bias", "net.conformer.layers.5.conv.net.0.weight", "net.conformer.layers.5.conv.net.0.bias", "net.conformer.layers.5.conv.net.2.weight", "net.conformer.layers.5.conv.net.2.bias", "net.conformer.layers.5.conv.net.4.conv.weight", "net.conformer.layers.5.conv.net.4.conv.bias", "net.conformer.layers.5.conv.net.6.gamma", "net.conformer.layers.5.conv.net.7.weight", "net.conformer.layers.5.conv.net.7.bias", "net.conformer.layers.6.conv.net.0.weight", "net.conformer.layers.6.conv.net.0.bias", "net.conformer.layers.6.conv.net.2.weight", "net.conformer.layers.6.conv.net.2.bias", "net.conformer.layers.6.conv.net.4.conv.weight", "net.conformer.layers.6.conv.net.4.conv.bias", "net.conformer.layers.6.conv.net.6.gamma", "net.conformer.layers.6.conv.net.7.weight", "net.conformer.layers.6.conv.net.7.bias", "net.conformer.layers.7.conv.net.0.weight", "net.conformer.layers.7.conv.net.0.bias", "net.conformer.layers.7.conv.net.2.weight", "net.conformer.layers.7.conv.net.2.bias", "net.conformer.layers.7.conv.net.4.conv.weight", "net.conformer.layers.7.conv.net.4.conv.bias", "net.conformer.layers.7.conv.net.6.gamma", "net.conformer.layers.7.conv.net.7.weight", "net.conformer.layers.7.conv.net.7.bias", "net.conformer.layers.8.conv.net.0.weight", "net.conformer.layers.8.conv.net.0.bias", "net.conformer.layers.8.conv.net.2.weight", "net.conformer.layers.8.conv.net.2.bias", "net.conformer.layers.8.conv.net.4.conv.weight", "net.conformer.layers.8.conv.net.4.conv.bias", "net.conformer.layers.8.conv.net.6.gamma", "net.conformer.layers.8.conv.net.7.weight", "net.conformer.layers.8.conv.net.7.bias", "net.conformer.layers.9.conv.net.0.weight", "net.conformer.layers.9.conv.net.0.bias", "net.conformer.layers.9.conv.net.2.weight", "net.conformer.layers.9.conv.net.2.bias", "net.conformer.layers.9.conv.net.4.conv.weight", "net.conformer.layers.9.conv.net.4.conv.bias", "net.conformer.layers.9.conv.net.6.gamma", "net.conformer.layers.9.conv.net.7.weight", "net.conformer.layers.9.conv.net.7.bias", "net.conformer.layers.10.conv.net.0.weight", "net.conformer.layers.10.conv.net.0.bias", "net.conformer.layers.10.conv.net.2.weight", "net.conformer.layers.10.conv.net.2.bias", "net.conformer.layers.10.conv.net.4.conv.weight", "net.conformer.layers.10.conv.net.4.conv.bias", "net.conformer.layers.10.conv.net.6.gamma", "net.conformer.layers.10.conv.net.7.weight", "net.conformer.layers.10.conv.net.7.bias", "net.conformer.layers.11.conv.net.0.weight", "net.conformer.layers.11.conv.net.0.bias", "net.conformer.layers.11.conv.net.2.weight", "net.conformer.layers.11.conv.net.2.bias", "net.conformer.layers.11.conv.net.4.conv.weight", "net.conformer.layers.11.conv.net.4.conv.bias", "net.conformer.layers.11.conv.net.6.gamma", "net.conformer.layers.11.conv.net.7.weight", "net.conformer.layers.11.conv.net.7.bias".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.