question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change pitch and formant

See original GitHub issue

Is it possible with praatIO? I didn’t find this in documentation.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
qo4oncommented, Jun 24, 2020

The best I found so far is PyRubberband. But it changes the pitch only and can’t change formants, I thought it should be a trivial thing, but I was wrong.

2reactions
qo4oncommented, Jun 22, 2020

Thank you very much for your answer! I managed to run your examples, but the quality of the output files is far from I expected. I took a file 03-01-01-01-01-01-01 changed a pitch +1 and a formant +100 cents in Melodyne and compared the result to PratIO. I used this code:

import os
from os.path import join

from praatio import kgio
from praatio import praat_scripts

path = os.path.abspath(join(".", "files"))
outputPath = join(path, "resynthesized_wavs")
if not os.path.exists(outputPath):
    os.mkdir(outputPath)

# File to manipulate
name = "03-01-01-01-01-01-01"
wavFN = join(path, name + ".wav")
mainKlaatFN = join(outputPath, name + ".KlattGrid")

# Wav to klaatgrid
# praatEXE = "/Applications/Praat.app/Contents/MacOS/Praat"  # Example for Mac
praatEXE = r"C:\Praat.exe" # Example for Windows
kgio.wavToKlattgrid(praatEXE, wavFN, mainKlaatFN, maxFormantFreq=3500,
                    pitchFloor=50, pitchCeiling=350)

# Increase formants by 20%
incrTwenty = lambda x: x * 1.2
kg = kgio.openKlattgrid(mainKlaatFN)

formantTier = kg.tierDict["oral_formants"]
subFormantTier = formantTier.tierDict["formants"]
for subTierName in subFormantTier.tierNameList:
    subFormantTier.tierDict[subTierName].modifyValues(incrTwenty)

outputName = name + "_twenty_percent_more"
klattFN = join(outputPath, outputName + ".KlattGrid")
outputWavFN = join(outputPath, outputName + ".wav")
kg.save(klattFN)
kgio.resynthesize(praatEXE, wavFN, klattFN, outputWavFN)

What can I do to make PratIO or ProMo results similar to Melodyne in terms of audio quality? I also tried parselmouth and get a lot of artifacts after formant shifting. I’m not sure why I can’t get the same quality with Praat.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 7 Vocal Formant and Pitch Techniques - Sage Audio
Formant changes are a great way to change the tonality of your vocal without changing the actual pitch. This way you can create...
Read more >
6 of the finest formant-shifting plugins - MusicRadar
Formant shifting is best explained in terms of the human voice. A typical vocal signal, like all signals with an inherent musical pitch, ......
Read more >
PITCH SHIFTING VS FORMANT SHIFTING - YouTube
Formants Explained and Demonstrated · Best Pitch Shifting Plugins for Vocals (Top 6) · Modern Vocal Effects: Formant Shifting with Little AlterBoy.
Read more >
Top 5 Free Vocal Tuning and Formant Plugins - YouTube
Top 5 Free Vocal Tuning and Formant Plugins ... FREE Pitch Correction, Pitch - Shift & Harmony with Graillon 2 Free VST with...
Read more >
Getting creative with formant shifting - YouTube
What is ' formant shifting, how does it differ from pitch shifting and how can you use it in creative ways? Let's take...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found