Improved support for the a11y technology Speech-To-Text

Kommentarer

3 kommentarer

  • bastet_of_orion
    Speech-To-Text is super important, and it seems to be a bit of a blind spot with Discord currently.
    2
  • DoubleD-1397

    Why no support for the hearing impaired? I invited a clan-mate to get on discord, and he said he was deaf, so he couldn't.  Man, what a bummer that was!  I felt like a total idiot.

    Does anyone know if Dragon would work with Discord?

    1
  • noahg2

    I dont know but i did attempt to write an extremely basic version in python

    import pyaudio
    from pocketsphinx import Pocketsphinx, Decoder
    from os import environ, path

    decoder = Pocketsphinx(hmm="model/en-us", lm="model/en-us.lm.bin", dict="model/cmudict-en-us.dict")
    p = pyaudio.PyAudio()
    stream = p.open(format=pyaudio.paInt16, channels=1, rate=16000, input=True, frames_per_buffer=512, input_device_index=1,
    as_loopback=True)
    stream.start_stream()

    in_speech_bf = False
    decoder.start_utt()
    while True:
    buf = stream.read(512)
    decoder.process_raw(buf, False, False)

    if decoder.get_in_speech() != in_speech_bf:
    in_speech_bf = decoder.get_in_speech()
    if not in_speech_bf:
    decoder.end_utt()
    print('Result:', decoder.hyp().hypstr)
    decoder.start_utt()
    0

Du måste logga in om du vill lämna en kommentar.