Interface module for Self-supervised Speech Models
Project description
Interface Design for Self-Supervised Speech Models
Links: arXiv
Interface module for Self-supervised Speech Models
Install
- First clone the repo
git clone git@github.com:atosystem/SSL_Interface.git
- install the repo
cd SSL_Interface pip install -e .
Usage
import torch
import SSL_Interface
import SSL_Interface.configs
import SSL_Interface.interfaces
WS_Interface = SSL_Interface.interfaces.WeightSumInterface(
SSL_Interface.configs.WeightedSumInterfaceConfig(
upstream_feat_dim=768,
upstream_layer_num=13,
normalize=False,
)
)
HConv_Interface = SSL_Interface.interfaces.HierarchicalConvInterface(
SSL_Interface.configs.HierarchicalConvInterfaceConfig(
upstream_feat_dim=768,
upstream_layer_num=13,
normalize=False,
conv_kernel_size=5,
conv_kernel_stride=3,
output_dim=768
)
)
layer, batch_size, seq_len, hidden_size = 13,8,100,768
feats = torch.randn(layer, batch_size, seq_len, hidden_size)
feats = feats.cuda()
WS_Interface = WS_Interface.cuda()
HConv_Interface = HConv_Interface.cuda()
out = WS_Interface(feats)
print(out.shape)
# torch.Size([8, 100, 768])
out = HConv_Interface(feats)
print(out.shape)
# torch.Size([8, 100, 768])
Reference Repositories
Citation
@article{shih_interface_2024,
title={Interface Design for Self-Supervised Speech Models},
author={Yi-Jen Shih and David Harwath},
journal={Interspeech},
year={2024},
publisher={IEEE}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ssl_interface-0.1.0.tar.gz
(6.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssl_interface-0.1.0.tar.gz.
File metadata
- Download URL: ssl_interface-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd8a894a6dd96a3f8a0631f7469e2a7779a63ba39ffc768275cd7bd1fc843ff2
|
|
| MD5 |
42065a5fddb35289b7b2bd132809776b
|
|
| BLAKE2b-256 |
9d9bf48019943590c4ce98f7af37126c4ac639c2e984400ca19b384552c9ee6f
|
File details
Details for the file SSL_Interface-0.1.0-py3-none-any.whl.
File metadata
- Download URL: SSL_Interface-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
172f2744d2887c54ed87d0f73fba20bd963b4cfadd2f288c6943b42648ba67cb
|
|
| MD5 |
2a619e1ddf2ad92257ea4f17ae4ba59b
|
|
| BLAKE2b-256 |
05852e35377c80e7e225867826a8c810b457213f486ba8ada2da5e8a6fd8bfa9
|