speechbrain
speechbrain copied to clipboard
couldn't find speechbrain.tokenizers.SentencePiece
speechbrain.tokenizers.SentencePiece Traceback (most recent call last): File "
", line 1, in AttributeError: module 'speechbrain.tokenizers' has no attribute 'SentencePiece'
Hello,
Could you please provide a minimal example that reproduces the error that you are facing? Thanks!
Hello, any news please?
Hello,
Could you please provide a minimal example that reproduces the error that you are facing? Thanks!
conda create --name sb_test python=3.9 conda activate sb_test python
import speechbrain speechbrain.tokenizers.SentencePiece.SentencePiece Traceback (most recent call last): File "
", line 1, in AttributeError: module 'speechbrain.tokenizers' has no attribute 'SentencePiece'
I was trying to reproduce this line: https://github.com/speechbrain/speechbrain/blob/develop/templates/speech_recognition/Tokenizer/tokenizer.yaml#L25
Hello @gelimcgill,
Please use from
instead of import
when fetching a specific class:
from speechbrain.tokenizers.SentencePiece import SentencePiece
if __name__ == "__main__":
print(SentencePiece)
Best.