Update README.md
Browse files
README.md
CHANGED
@@ -61,7 +61,7 @@ def audio_to_sound_tokens(audio_path, target_bandwidth=1.5, device="cuda"):
|
|
61 |
flatten_tokens = torch.stack((audio_code1, audio_code2), dim=1).flatten().tolist()
|
62 |
|
63 |
# Convert to sound tokens
|
64 |
-
result = ''.join(f'<|sound_{num}|>' for num in flatten_tokens)
|
65 |
return f'<|sound_start|>{result}<|sound_end|>'
|
66 |
|
67 |
# Usage
|
|
|
61 |
flatten_tokens = torch.stack((audio_code1, audio_code2), dim=1).flatten().tolist()
|
62 |
|
63 |
# Convert to sound tokens
|
64 |
+
result = ''.join(f'<|sound_{num:04d}|>' for num in flatten_tokens)
|
65 |
return f'<|sound_start|>{result}<|sound_end|>'
|
66 |
|
67 |
# Usage
|