<jupyter_start><jupyter_text>As described in <NAME>'s [README](README.md) and [audio2stl.r](audio2stl.r), the `audio2stl()` method takes 6 parameters:required:- inputfile: filepath string associated with WAV audio fileoptional:- outputfile: filepath sring associated with STL file to save- sampfreq: re-sampling frequency- axisnorm: keep the x- and y-axes scaling (FALSE) or normalize so that they have the same dimensions (TRUE)- preemph: value for pre-emphasis of audio- window: option for windowing audio using a variety of Matlab/Octave compatible filters found in the "signal" package. E.g. 'bartlett', 'blackman', 'hamming', 'hanning', 'triang'<jupyter_code>files <- list.files(path="files/", pattern="*.wav", full.names=FALSE, recursive=FALSE)
lapply(files, function(x) {
    input = paste("files/", x,sep="")
    message(input)
    out = paste("output/converted_", x,sep="")
    audio2stl(input, out)
    message(out)
    # t <- read.table(x, header=TRUE) # load file
    # apply function
    # out <- function(t)
    # write to file
    # write.table(out, "path/to/output", sep="\t", quote=FALSE, row.names=FALSE, col.names=TRUE)
})


# to save to STL use:
# audio2stl("phonetics.wav", "result.stl")

# David: It is unclear to me why this screen is black. When saving the STL it does show a proper model<jupyter_output>files/phonetics.wav

Dimensions of model are: 50.0 mm x 15.7 mm x 24.0 mm

output/converted_phonetics.wav

files/watchandlisten1.wav

Warning message in tuneR::readWave(inputfile, toWaveMC = T):
“Wave file 'files/watchandlisten1.wav' seems to be corrupted.”
Dimensions of model are: 7.7 mm x 50.0 mm x 3.9 mm

output/converted_watchandlisten1.wav
{'fraction_non_alphanumeric': 0.12485065710872162, 'fraction_numerical': 0.014934289127837515, 'mean_word_length': 4.583333333333333, 'pattern_counts': {'":': 0, '<': 8, '<?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': '227487', 'license': 'MIT', 'n_tokens_mistral': 587, 'n_tokens_neox': 555, 'n_words': 182, 'path': 'index.ipynb', 'repo_name': 'davidverweij/audio2stl', 'size': '1688'}