import re


def parse_speech(line: str, nlp) -> tuple:
    """
    Parses the speech in a line of text.

    :param line: text line
    :param nlp: spacy nlp object
    :return: the spoken line and the speaker
    """
    speech_pattern = re.compile(r'(?<=“).*?(?=”)')
    speech = speech_pattern.findall(line)
    speaker = "N/A"
    ids = [line.index(s) + len(s) + 1 for s in speech]
    for idx in ids:
        if idx < len(line):
            doc = nlp(line.split('”')[1].split('“')[0])
            nouns = [chunk.text for chunk in doc.noun_chunks]
            if nouns:
                speaker = nouns[0].strip()

    return ' '.join(speech), speaker