    def append_token(xs: torch.Tensor, x: int) -> torch.Tensor:
        """Append new token to prefix tokens.

        Args:
            xs (torch.Tensor): The prefix token
            x (int): The new token to append

        Returns:
            torch.Tensor: New tensor contains: xs + [x] with xs.dtype and
            xs.device

        """
        x = torch.tensor([x], dtype=xs.dtype, device=xs.device)
        return torch.cat((xs, x))
Append new token to prefix tokens.

Args:
xs (torch.Tensor): The prefix token
x (int): The new token to append

Returns:
torch.Tensor: New tensor contains: xs + [x] with xs.dtype and
xs.device
modules/wenet_extractor/paraformer/search/beam_search.py