<jupyter_start><jupyter_text>Base on RandomGet random sample audio of sample.<jupyter_code>rate, sample = wavfile.read("sample/sample.wav")
sample = sample[:, 0]
durasi = 5

def getAudio(sample, rete, durasi=5, min=0):
    node = randint(min, len(sample))
    return sample[node : node + rate * durasi]

results = []
for i in range(int(30/durasi)):
    results.append(getAudio(sample, rate, durasi))
    results.append(np.zeros(1*rate)) # silent space
result = np.concatenate(tuple(results))
wavfile.write('sample/result.wav', rate,  result)
# Audio(result, rate=rate)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1488294314381271, 'fraction_numerical': 0.011705685618729096, 'mean_word_length': 5.730337078651686, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '548203', 'license': 'MIT', 'n_tokens_mistral': 220, 'n_tokens_neox': 216, 'n_words': 46, 'path': 'learning/book-1.ipynb', 'repo_name': 'ngupuk/audio-ig-selector', 'size': '598'}