Kesha felt as if she had "lost the rights to [herself]" during her legal battle with Dr. Luke.
The 37-year-old singer recently left Kemosabe - which is distributed by RCA Records - in December, six months after her long-running legal battle with the producer came to an end but admitted that shortly after signing with him in the late 2000s she dealt with the "ugly" situation by writing hits such as 'Tik Tok'.
Speaking during a TED Talk, she said: "I found myself in a very ugly litigation with the same person who I had signed the rights to my recorded voice to. I had lost the rights to my voice, and in that I felt as if I had lost the rights to myself.
"It was very public. It was very painful. I was very angry. So I did what I do with all my emotions, and I wrote my way through it.
"On March 6, 2024, I’ve gained back legal rights over my own voice. And with it, a newly found freedom for the first time in nearly 20 years,” she later said.
“It’s funny how you can lose the rights to your own voice, but you can never lose the rights to your truth."
The 'Joyride' hitmaker- who sued Dr. Luke sexual assault and battery, sexual harassment, gender violence, emotional abuse, and violation of California business practices and only saw her legal battle come to an end in March 2024 - now knows that whenever she is feeling exceptionally emotional, she needs to write a song.
She said: "Songwriting is a direct line of communication with the truth. In song, you can say things you can’t say out loud to anyone else — not your friends, not your therapist, not your mom.
"When I’m feeling anything intensely, I know it’s time for me to write a song."
Kesha and Dr. Luke, 50, had been locked in a legal dispute for years after she filed a lawsuit accusing him of drugging and raping her after a party in 2005, prompting the music executive - who denied the allegation - to file a defamation case.
But in June last year, they settled out of court after nearly 10 years, just weeks before they were set to go to trial.
The pair said in a joint statement shared on Kesha’s Instagram stories: “Kesha and Dr Luke have agreed to a resolution of the lawsuit, and have agreed to issue and post a joint statement regarding that resolution.”