def METHOD_NAME(
    phrase_identity: PhraseIdentity,
    file_name: str,
    destination_path: Path,
    course: Course,
    settings,
):
    tts_settings_list = course.settings.audio_settings.text_to_speech_settings_list
    if tts_settings_list == []:
        raise RuntimeError(
            f"Cannot generate {destination_path} because there are no TTS settings configured"
        )
    chosen_tts_settings = random.choice(tts_settings_list)
    if settings.dry_run:
        print(
            f"Would generate {destination_path} "
            f"using {chosen_tts_settings.voice} {chosen_tts_settings.engine}"
        )
    else:
        print(
            f"Generating {destination_path} "
            f"using {chosen_tts_settings.voice} {chosen_tts_settings.engine}"
        )
        # This is where more more TTS providers would be added with an if statement.
        # For now there is only Polly.
        tts_provider = "polly"
        subprocess.run(
            [
                "aws",
                tts_provider,
                "synthesize-speech",
                "--output-format",
                "mp3",
                "--voice-id",
                chosen_tts_settings.voice,
                "--engine",
                chosen_tts_settings.engine,
                "--text",
                phrase_identity.text,
                destination_path,
            ],
            stdout=subprocess.DEVNULL,
        )
    return {
        "id": file_name,
        "text": phrase_identity.text,
        "source": "TTS",
        "license": course.license.full_name,
        "ttsProvider": "Polly",
        "ttsVoice": chosen_tts_settings.voice,
        "ttsEngine": chosen_tts_settings.engine,
    }