Skip to content

Synteraction-Lab/WSCoach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSCOACH

A wearable assistant that uses auditory feedback to help users avoid unwanted words in everyday conversation.

Publications

  • WSCoach: Wearable Real-time Auditory Feedback for Reducing Unwanted Words in Daily Communication, UbiComp/ISWC'25
    • Camera Ready PDF

Contact person

Project links

  • Project folder (private access): here

Table of Contents

Features

  • Word Detection: Recognizes specific words or phrases in a given text string.
  • Tracking: Keeps track of the number of times each word is detected.

Installation

No additional installation is required for this module. However, make sure that the required dependencies are installed in your Python environment, the required dependencies is listed in the requirement.txt.

Usage

If you want a easy show of the WSCOACH, just run the HTML_render.py and then you can use the basic features of WSCOACH.

FasterWhisperModel Module

The FasterWhisperModel module provides a wrapper for the Faster-Whisper ASR (Automatic Speech Recognition) model. It allows for efficient transcription of audio files or arrays, with a focus on faster processing.

Features

  • Fast Transcription: Utilizes the Faster-Whisper ASR model for efficient and quick audio transcription.
  • File and Array Transcription: Supports transcription from both audio files and arrays.

Installation

No additional installation is required for this module. However, make sure that the required dependencies are installed in your Python environment.

Usage

  1. Import the FasterWhisperModel class into your Python script.

    from faster_whisper import FasterWhisperModel
  2. Create an instance of the FasterWhisperModel class.

    model = FasterWhisperModel()
  3. Use the TranscribeFile method to transcribe audio from a file.

    text = model.TranscribeFile("./path/to/audio/file.wav")
    print(f"Transcribed Text: {text}")
  4. Use the TranscribeArray method to transcribe audio from a NumPy array.

    text = model.TranscribeArray(audio_array)
    print(f"Transcribed Text: {text}")

Record Module

The Record module provides functionality for recording audio using the PyAudio library. It captures audio input from a specified input device and writes it to a WAV file. Additionally, it supports playing back recorded audio.

Features

  • Audio Recording: Records audio input from a specified input device.
  • Buffer Management: Manages an internal buffer to store audio data efficiently.
  • Wave File Creation: Writes recorded audio to a WAV file.
  • Audio Playback: Supports playback of recorded audio.

Installation

No additional installation is required for this module. However, make sure that the required dependencies are installed in your Python environment.

Usage

  1. Import the Record class into your Python script.

    from Record import Record
  2. Create an instance of the Record class.

    record = Record()
  3. Optionally, set the input and output devices using the provided methods.

    input_device_names = record.get_device_input_names()
    output_device_names = record.get_device_output_names()
    
    record.set_device_input_index("Your_Input_Device_Name")
    record.set_device_output_index("Your_Output_Device_Name")
  4. Start the recording thread.

    record.start()
  5. Optionally, capture the audio buffer.

    audio_buffer = record.GetBuffer()
  6. Optionally, end the recording.

    record.endRecord()
  7. Optionally, play the recorded audio.

    record.playWave("Your_Wave_File_Name", detect=detect_instance, first_name="Your_First_Name")

TTS Module

The TTS module utilizes the pyttsx4 library to convert text into speech and save the generated audio as WAV files. It provides the ability to adjust the speech rate and save individual words or phrases as separate audio files.

Features

  • Text-to-Speech Conversion: Converts input text into speech.
  • Adjustable Speech Rate: Allows the user to set the speech rate.
  • Saving to WAV Files: Saves the generated speech as WAV files.

Installation

No additional installation is required for this module. However, make sure that the required dependencies are installed in your Python environment.

Usage

  1. Import the TTS class into your Python script.

    from TTS import TTS
  2. Create an instance of the TTS class.

    tts = TTS()
  3. Optionally, set the speech rate.

    tts.SetRate(2.0)
  4. Use the Word2File method to convert and save text as a WAV file.

    tts.Word2File("Hello World")

Contributing

If you would like to contribute to the development of this project or report issues, please contract us.

License

This project is open source and available under the MIT License.

About

[IMWUT 25] A wearable assistant to avoid unwanted words during daily conversations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages