Initial commit: FunASR Speech Recognition Toolkit
Update API Documentation / build-api-docs (push) Has been cancelled
Update API Documentation / build-api-docs (push) Has been cancelled
Add complete FunASR codebase including models, runtime, and documentation.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
from funasr.register import tables
|
||||
from funasr.models.whisper_lid.eres2net.ResNet import (
|
||||
ERes2Net,
|
||||
BasicBlockERes2Net,
|
||||
BasicBlockERes2Net_diff_AFF,
|
||||
)
|
||||
|
||||
|
||||
@tables.register("lid_predictor_classes", "LidPredictor")
|
||||
class LidPredictor(ERes2Net):
|
||||
def __init__(
|
||||
self,
|
||||
block=BasicBlockERes2Net,
|
||||
block_fuse=BasicBlockERes2Net_diff_AFF,
|
||||
num_blocks=[3, 4, 6, 3],
|
||||
m_channels=32,
|
||||
feat_dim=80,
|
||||
embedding_size=192,
|
||||
pooling_func="TSTP",
|
||||
two_emb_layer=False,
|
||||
):
|
||||
"""Initialize LidPredictor.
|
||||
|
||||
Args:
|
||||
block: TODO.
|
||||
block_fuse: TODO.
|
||||
num_blocks: TODO.
|
||||
m_channels: TODO.
|
||||
feat_dim: Size/dimension parameter.
|
||||
embedding_size: Size/dimension parameter.
|
||||
pooling_func: TODO.
|
||||
two_emb_layer: TODO.
|
||||
"""
|
||||
super(LidPredictor, self).__init__(
|
||||
block=block,
|
||||
block_fuse=block_fuse,
|
||||
num_blocks=num_blocks,
|
||||
m_channels=m_channels,
|
||||
feat_dim=feat_dim,
|
||||
embedding_size=embedding_size,
|
||||
pooling_func=pooling_func,
|
||||
two_emb_layer=two_emb_layer,
|
||||
)
|
||||
Reference in New Issue
Block a user