forked from mrq/tortoise-tts
3dc66ba308
This reverts commit 1a41f7f7694cc88b10961424d10e4490a358f9fd, reversing changes made to cf7a4bc7e773465a8e913228d642b81ca0475eb7.
14 lines
533 B
Python
14 lines
533 B
Python
import argparse
|
|
|
|
from api import classify_audio_clip
|
|
from utils.audio import load_audio
|
|
|
|
if __name__ == '__main__':
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('--clip', type=str, help='Path to an audio clip to classify.', default="results/favorite_riding_hood.mp3")
|
|
args = parser.parse_args()
|
|
|
|
clip = load_audio(args.clip, 24000)
|
|
clip = clip[:, :220000]
|
|
prob = classify_audio_clip(clip)
|
|
print(f"This classifier thinks there is a {prob*100}% chance that this clip was generated from Tortoise.") |