There are phonetic solfège names for all 12 musical notes. These are hard to intuit and differ when ascending vs. descending. For example:
Ascending = doh, dee, ray, ree, mee, fah, fee, sol, see, lah, lee, tee, doh.
Descending = doh, tee, tay, lah, lay, sol, say, fah, mee, may, ray, rah, doh.
You may have noticed that each of these scales contains "doh, ray, mee, fah, sol, lah, tee, doh" and "doh, tee, lah, sol, fah, mee, ray, doh". This is the major or Ionian scale, made familiar by the Sound of Music. The five notes that fall in between these major scale notes are the ones that get the different names going up and going down,depending on whether they are being flattened or sharpened. (Whenever you're using a scale other than that major scale, you're going to have one or more of these other notes in the scale.)
Use the major scale as the home base and assign a numeric name to each note. So "doh, ray, mee, fah, sol, lah, tee, doh" becomes "one, two, three, four, five, six, sev, one", and "doh, tee, lah, sol, fah, mee, ray, doh" becomes "one, sev, six, five, four, three, two, one". That seems easier to understand and remember, especially when descending.
Let's use the C-major scale as an example. The notes are one (C), two (D), three (E), four (F), five (G), six (A), sev (B), one/eight (C). When you need to raise (AKA "sharpen") any of those notes, use a word that rhymes with the note number you are sharpening and add an "r" sound in front of it (r for "raised"). Raised two (D#) = roo, raised four (F#) = ror, raised five (G#) = rive, and raised six (A#) = rix. (Note: you probably wouldn't raise the one - you would diminish the two; you probably wouldn't raise the three because that's already four, and you probably wouldn't raise the sev because that's already one, but there may be situations that call for this).
When you need to diminish (AKA"flatten") any of those notes in the major scale, use a word that rhymes with the note number you are flattening and add a "d" sound in front of it (d for "diminished"). Again, in the key of C major, diminished two (Db) = doo, diminished three (Eb) = dee, diminished five (Gb) = dive, diminished six (Ab) = dix, and diminished sev (Bb) = dev. (Note: diminished four is the same as three, diminished one is the same as sev).
Once you understand this concept, you'll have a phonetic/numeric name for any note in any melody, based on its relation to the "one". The benefits of defining it this way are endless. It's as if you didn't have a name for the colors red, orange and pink, but now suddenly do. When you have a word for red it becomes more tangible and distinct from orange and pink.