GithubHelp home page GithubHelp logo

Trying to use the core API play. about pysox HOT 4 CLOSED

tkamaal avatar tkamaal commented on August 28, 2024
Trying to use the core API play.

from pysox.

Comments (4)

rabitt avatar rabitt commented on August 28, 2024

Hey @tkamaal

Right now play is (somewhat opaquely) wrapped inside the preview() method of the Transformer and Combiner classes.

A minimal example would be:

import sox
tfm = sox.Transformer()
tfm.preview("path_to_a_file.wav")

any number of effects can be applied and previewed as well:

import sox
tfm = sox.Transformer()
tfm.reverb()
tfm.reverse()
tfm.preview("path_to_a_file.wav")

If these examples doesn't work on your system, it's likely because the sox installation on Windows doesn't come with the play binary. If so, please let me know!

from pysox.

tkamaal avatar tkamaal commented on August 28, 2024

Thank you @rabitt !

from pysox.

jgmgoncalves avatar jgmgoncalves commented on August 28, 2024

If these examples doesn't work on your system, it's likely because the sox installation on Windows doesn't come with the play binary. If so, please let me know!

Hi! I'm facing a similar problem where anytime I use preview on Windows, I get the same error, even though the file path is correct:
"OSError: Play failed! [WinError 2] The system cannot find the file specified"

Is it possible to get the play binary for Windows?
Thanks!

from pysox.

rabitt avatar rabitt commented on August 28, 2024

@jgmgoncalves can you check if you're able to run play filename.wav from a terminal window on your system, or if this is a pysox specific problem?

Linking to this forum which is relevant: https://sourceforge.net/p/sox/mailman/message/28683080/

If this is a persistent problem for windows users, we can test swapping the shell to play with sox and the -d flag.

from pysox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.