0

I'm experimenting with pysox and trying to simply convert a WAV file to GSM.

I'm currently using the following approach which works just fine:

infile = pysox.CSoxStream("input_file.wav")
outfile = pysox.CSoxStream('output_file.gsm','w',infile.get_signal())
chain = pysox.CEffectsChain(infile, outfile)
chain.flow_effects()
outfile.close()

I wonder if there's a better/builtin way without using effects (as i'm not applying any effects) .

thanks in advance

Erik A
  • 31,639
  • 12
  • 42
  • 67

1 Answers1

0

I found that i actually must use libsox effect as i'm changing the rate :

 chain.add_effect(pysox.CEffect("rate", ["8k"])) 

Without adding this line the output appears in slow motion (since my original file can have different rate)