“You are the writer, but I am the author!”

When famed ghost-singer Marni Nixon said those words to me, her ghostwriter, I didn’t quite understand how any of it would work. I had written previous books on my own (“That Book about That Girl,” “Noel Coward: A Bio-bibliography”), but had never been a ghostwriter before. And aren’t they one and the same: author and writer?

What I eventually learned from that “Marni-ese” was that it was all about collaboration. Over the course of a year and a half of intense back and forth work on her memoirs, “I Could Have Sung All Night” (which we almost called “Audrey Hepburn Dubbed My Face”), I came to realize that Marni Nixon was the consummate collaborator.

She was dubbed “the ghostess with the mostest” by Time Magazine when it became public knowledge that she had dubbed Deborah Kerr, Natalie Wood and Audrey Hepburn in “The King and I,” “West Side Story” and “My Fair Lady,” respectively. And although there was great respect from Kerr and Hepburn, Natalie Wood, who expected to sing all her own songs herself, ignored Marni and filmed to only her own pre-recordings.

Marni thought it was shameful that the powers that be lied to Natalie and told her that her singing was wonderful, while secretly rolling their eyes. When Marni came in to sing with the very same orchestra, the players — who all knew her from her various symphony appearances (conducted by Leonard Bernstein) — applauded a real singer. In the end, Natalie filmed the songs to her own wobbly and shrill tracks, but after the dust settled, Marni was called in to meticulously and, in some cases when the synch was off, laboriously post-dub every note.

This was the opposite experience from her joyful collaboration with Deborah Kerr for “The King and I.” Kerr had no qualms about being dubbed and wanted Marni in on every bit of her rehearsals, so that the “voice” would match the acting intentions, and the protagonist Mrs. Anna would be played, both spoken and singing, with one voice made by two artist. Take a listen to the original soundtrack and you can hear how Kerr and Nixon trade lines that are spoken and lines that are sung to meld into one fabulous performance.

Marni was told, “If anything ever gets out that you sang one note, you will never work in this town again.” But it was Kerr who graciously spilled the beans and revealed to syndicated columnist Earl Wilson that Marni sang “some of her high notes.” This was the first time the public was given a glimpse behind the screen.

Audrey Hepburn worked as hard she could to sing Eliza Doolittle’s difficult songs in “My Fair Lady,” and even went to voice lessons and coaching with Marni (they were pals during the rehearsal period and shared a limo to the studio). But little by little, it became apparent that her low, reedy voice, which was so beguiling singing “Moon River” or the songs of “Funny Face,” was not suited for Lerner and Loewe. So Marni’s pre-recordings and post-dubbings were substituted, to the disappointed of Ms. Hepburn. It was also during this time that the cat jumped all the way out of the bag and most of the press knew that Marni was a large part of Hepburn’s Eliza. The backlash resulted in no Oscar nomination for Hepburn and a sure fire win for Julie Andrews for “Mary Poppins.”

Although it was the beginning of the end of the big roadshow musical, Marni was thrilled to finally appear on the screen as Sister Sophia in the biggest hit of all, “The Sound of Music.” But at the premiere, when she arrived, dressed to kill, in her stretch limo, she was for a minute mistaken for Julie Andrews. There was a roar of recognition and then, just as suddenly, the crowd and reporters saw it wasn’t Julie. “Oh,” Marni overheard, “she’s nobody!”

But Marni was somebody: An Emmy Award winning host of a children’s TV show, a sought after voice teacher, Stravinsky’s favorite singer, a concert favorite conducted by Bernstein and Previn, a beloved Broadway actress. A ghost who materialized.

She was also my dear friend who, when I sent her email signed “me” would return hers signed “me2.” Oh yes, she also made sure that she, who never got screen credit for her vocals, gave me co-author credit for her memoirs. I was “the ghost’s ghost.”

Stephen Cole has written musicals including “After the Fair,” “The Road to Qatar,” “The Night of the Hunter,” “Time after Time” and the “Merman’s Apprentice.” His books include “That Book about That Girl” and books on Noel Coward and Charles Strouse.