Skip to content

TranscriptionConfig custom spellings property raises error fetching valid custom spelling config #92

Closed

Description

@danieljnchen

TranscriptionConfig.set_custom_spelling sets the raw transcription config's from to a list, but TranscriptionConfig.custom_spelling property raises an error if from is not a string.

>>> import assemblyai as aai
>>> tc = aai.TranscriptionConfig(custom_spelling={"a": ["b", "c"]})
>>> tc.custom_spelling
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/danielchen/.local/share/virtualenvs/transcribe_audio-AdYllNfC/lib/python3.11/site-packages/assemblyai/types.py", line 930, in custom_spelling
    raise ValueError("`from` argument must be a string!")
ValueError: `from` argument must be a string!

Activity

  1. ploeber commented on Oct 11, 2024

    @ploeber
    Contributor

    Thanks for reporting! I'll create a fix for the next version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions