Skip to content

Couple of issues with the code on the readme.md #10

@tinpark

Description

@tinpark

Hi James, this is totally brilliant set of tools and fantastically helpful. Thanks for sharing it. I was just getting going and fell when using the example on the readme.md page, a few bits and pieces missing from the imports and a typo in the fluid name, easy to fix, but might slow a newbie like me down... :). This works for me, with obviously, swapping the paths to src and corpus. Hope it's all going well.

# import ftis modules that we need
from ftis.analyser.slicing import FluidNoveltyslice # novelty slicing
from ftis.world import World # a ftis 'world'
from ftis.corpus import Corpus # a corpus object
from ftis.analyser.audio import ExplodeAudio, CollapseAudio

src = Corpus("~/corpus-folder/corpus1") # corpus object collects audio files at this directory
out = "~/corpus-folder/slicing" # set an output folder

# instantiate an instance of the process
world = World(sink=out)

# Connect together processes using >>
src >> FluidNoveltyslice(threshold=0.35, feature=1) >> ExplodeAudio()

# now add a Corpus node to our world
world.build(src)

if __name__ == "__main__":
    world.run() # finally run the chain of connected analysers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions