Thanks for your reply，that’s my script ，please check
import torch
import torchaudio.sox_effects as sox_effects

 def forward(self, audio: torch.Tensor, speed: torch.Tensor, pitch: torch.Tensor, sr: torch.Tensor, vol: torch.Tensor): 

    speed = str(speed.item())

    pitch = str(pitch.item())

    sr = str(int(sr.item()))

    vol = str(vol.item())

    effects = [['tempo','-s', speed], ['pitch', pitch],['rate', sr], ['vol', vol]]

    waveform, _ = sox_effects.apply_effects_tensor(audio, int(sr), effects)

    return waveform