A Very Poetic Program
Library loaded twice

If library.txt exists, it will get loaded twice:


if os.path.isfile('library.txt'):
    library = load_library()
else:
    # download the file ...

library = load_library()



I guess this was just an oversight, with a simple fix:

if not os.path.isfile('library.txt'):
    # download the file ...

library = load_library()


Filter while loading

Instead of loading the library first and then filtering out the commented lines, it would be better to filter as you read:

with open('library.txt', 'r') as library:
    return [line for line in library if not line.startswith(';;;')]


Use generator expressions for better performance

It's a pity to loop over the entire list and filtering when you will only use the first match:


phonemes = [y for y in library if y.startswith(string)][0][len(string):]



You would do better with a generator expression,
which is more or less as simple as replacing the surrounding [...] with (...).
However, generators are not subscriptable, so to get the first element you must use the next(...) builtin:

phonemes = next(y for y in library if y.startswith(string))[len(string):]