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,32 @@
|
||||
import logging
|
||||
|
||||
import torch
|
||||
|
||||
from funasr.models.transformer.model import Transformer
|
||||
from funasr.register import tables
|
||||
|
||||
|
||||
@tables.register("model_classes", "Conformer")
|
||||
class Conformer(Transformer):
|
||||
"""Conformer: CTC-attention hybrid encoder-decoder model.
|
||||
|
||||
Combines convolution and self-attention in the encoder for better
|
||||
local and global context modeling. Inherits full Transformer pipeline
|
||||
(CTC + attention decoder + beam search).
|
||||
|
||||
Output: {"key": str, "text": str}
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*args,
|
||||
**kwargs,
|
||||
):
|
||||
|
||||
"""Initialize Conformer.
|
||||
|
||||
Args:
|
||||
*args: Variable positional arguments.
|
||||
**kwargs: Additional keyword arguments.
|
||||
"""
|
||||
super().__init__(*args, **kwargs)
|
||||
Reference in New Issue
Block a user