Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous mode not working #148

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9fde685
Update README.md for Transcribe
vivekuppal Jun 29, 2023
1483fea
Merge pull request #1 from vivekuppal/vu-readme-updates
vivekuppal Jun 29, 2023
391d728
Allow usage without a valid OPEN API key. (#2)
vivekuppal Jun 29, 2023
ab4245d
Update README.md (#3)
vivekuppal Jun 29, 2023
ebb6f2f
Allow user to choose model. Add arguments to main file.
vivekuppal Jun 29, 2023
8f5a595
Code clean up, add linting. (#4)
vivekuppal Jun 30, 2023
59d5c91
UI Text Chronology (#5)
vivekuppal Jun 30, 2023
f772bb8
Update readme with Enhancements. Allow copy of text from UI window. R…
vivekuppal Jun 30, 2023
87a38b1
Save conversation to text. (#9)
vivekuppal Jun 30, 2023
65d6dcf
Add Contextual Information to Responses (#11)
vivekuppal Jun 30, 2023
d1b3c45
Allow users to pause audio transcription. Change the default for gett…
vivekuppal Jul 3, 2023
cfca51a
Update main.py (#15)
abhinavuppal1 Jul 11, 2023
152bad3
Code reorg to separate UI code (#16)
vivekuppal Jul 12, 2023
addf17f
Add support for multiple languages (#18)
vivekuppal Jul 12, 2023
e5cda88
Easy install for non developers on windows (#20)
vivekuppal Jul 18, 2023
9896c1c
Disabled winrar UI (#22)
Adarsha-gg Jul 18, 2023
901501b
When using API, we do not need to specify language, absorb the lang p…
vivekuppal Jul 18, 2023
bd48b61
Language combo fix (#26)
Adarsha-gg Jul 19, 2023
7c9ca88
Added gdrive (#27)
Adarsha-gg Jul 19, 2023
2429c97
Allow usage of API Key in installed version of Transcribe (#28)
vivekuppal Jul 19, 2023
12ef846
updated the drive link (#30)
Adarsha-gg Jul 20, 2023
4be26c7
Add a duration class to easily measure the time taken for an operatio…
vivekuppal Jul 21, 2023
6e53b31
--api option was not working correctly (#34)
vivekuppal Jul 21, 2023
bd42b8c
Initial unit tests for the speech recognition library (#36)
vivekuppal Jul 24, 2023
af87eff
user reported defect fixes. (#39)
vivekuppal Jul 26, 2023
26cfaad
Optimize LLM usage (#40)
vivekuppal Jul 26, 2023
f8d5857
Bug fixes for exceptions observed during usage. Add further plumbing …
vivekuppal Jul 27, 2023
1356a78
Add logging infrastructure (#42)
vivekuppal Jul 27, 2023
a1cc48b
Get Response from LLM on demand (#44)
vivekuppal Jul 28, 2023
ea5f392
Models from open ai site (#43)
Adarsha-gg Jul 28, 2023
b4e03a4
List all active devices (#45)
vivekuppal Aug 1, 2023
85d09ed
Allow user to select input, output audio devices (#48)
vivekuppal Aug 21, 2023
28d1e9a
Disable mic speaker selectively (#49)
vivekuppal Aug 23, 2023
e48bdb8
Add Audio Response for LLM generated content (#50)
vivekuppal Aug 27, 2023
6baa77f
Update, upload latest binaries (#54)
Adarsha-gg Aug 30, 2023
fa55416
Multiturn prompts, bug fixes (#55)
vivekuppal Sep 5, 2023
ce5a1e1
Allow enable/disable speaker and microphone from UI (#56)
Adarsha-gg Sep 6, 2023
e445856
Update gdrive link (#58)
Adarsha-gg Sep 7, 2023
b50f58c
Bring readme up to date with current functionality. Describe content …
vivekuppal Sep 8, 2023
a7ea2cc
Continuous mode broke after updates to the UI.
vivekuppal Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
--api option was not working correctly (#34)
--api option was not working correctly even when a good API key was provided.

For transcription local models are working well.
When using --api option and attempting to transcribe using openAI API transcription was not happening because incorrect API Key was being sent to the API.
  • Loading branch information
vivekuppal committed Jul 21, 2023
commit 6e53b317443f2b0b1369886694ebef0c272341e5
2 changes: 2 additions & 0 deletions TranscriberModels.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import whisper
import os
import torch
import GlobalVars


def get_model(use_api: bool, model: str = None):
Expand Down Expand Up @@ -61,6 +62,7 @@ def load_model(self):
class APIWhisperTranscriber:
def __init__(self):
print('Using Open AI API for transcription.')
openai.api_key = GlobalVars.TranscriptionGlobals().api_key
# lang parameter is not required for API invocation. This exists solely
# to support --api option from command line.
# A better solution is to create a base class for APIWhisperTranscriber,
Expand Down
9 changes: 4 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
from argparse import RawTextHelpFormatter
import time
import requests
import subprocess
from requests.exceptions import ConnectionError
from AudioTranscriber import AudioTranscriber
from GPTResponder import GPTResponder
import customtkinter as ctk
import TranscriberModels
import subprocess
import interactions
import ui
from language import LANGUAGES_DICT
Expand Down Expand Up @@ -64,8 +64,8 @@ def main():
except ConnectionError:
print('Operating as a standalone client')

global_vars = GlobalVars.TranscriptionGlobals()
config = configuration.Config().get_data()
global_vars = GlobalVars.TranscriptionGlobals(key=config["OpenAI"]["api_key"])

# Command line arg for api_key takes preference over api_key specified in parameters.yaml file
if args.api_key is not None:
Expand Down Expand Up @@ -120,9 +120,8 @@ def main():

ui_cb = ui.ui_callbacks()
global_vars.freeze_button.configure(command=ui_cb.freeze_unfreeze)
update_interval_slider_label.configure(text=f"Update interval: \
{update_interval_slider.get()} \
seconds")
label_text = f'Update Response interval: {update_interval_slider.get()} seconds'
update_interval_slider_label.configure(text=label_text)

lang_combobox.configure(command=model.change_lang)

Expand Down
5 changes: 2 additions & 3 deletions ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ def update_response_ui(responder, textbox, update_interval_slider_label,
textbox.configure(state="disabled")

update_interval = int(update_interval_slider.get())
responder.update_response_interval(update_interval)
update_interval_slider_label.configure(text=f"Update interval: \
{update_interval} seconds")
responder.set_response_interval(update_interval)
update_interval_slider_label.configure(text=f"Update Response interval: {update_interval} seconds")

textbox.after(300, update_response_ui, responder, textbox,
update_interval_slider_label, update_interval_slider,
Expand Down