Skip to content

Commit

Permalink
Revert "#Update - Add form to configure dual voices (incomplete_)"
Browse files Browse the repository at this point in the history
This reverts commit f77069b.
  • Loading branch information
SanHacks committed Nov 8, 2023
1 parent f77069b commit 1cbfa75
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 38 deletions.
Binary file modified DB/settings.db
Binary file not shown.
4 changes: 2 additions & 2 deletions Variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ package main
// I REPEAT, DO NOT LEAK YOUR KEYS.
// NOW REPEAT WITH ME, "I WILL NOT LEAK MY TOKENS"!
const (
openKeys = "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"
speechKeys = "69fffe07f90a4505a58dc14425dff6a8"

This comment has been minimized.

Copy link
@SanHacks

SanHacks Nov 8, 2023

Author Owner

The irony :)

openKeys = "OPENAI"
speechKeys = "AZURE"
)
20 changes: 0 additions & 20 deletions aigenUi/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,6 @@ func ChangeSetting(soundIsOn int) {
}
}

func ChangeVoice(provider string) {
db, err := sql.Open("sqlite3", SettingsDB)
if err != nil {
log.Printf("Error opening database: %v", err)
}
defer func(db *sql.DB) {
err := db.Close()
if err != nil {
log.Println(err)
}

}(db)

// Insert the keylogger into the database
_, err = db.Exec("INSERT INTO settings (speech_provider) VALUES (?)", provider)
if err != nil {
log.Printf("Error inserting into database: %v", err)
}
}

func SoundIsOffON(soundIsOff int) {
db, err := sql.Open("sqlite3", SettingsDB)
if err != nil {
Expand Down
13 changes: 0 additions & 13 deletions aigenUi/uiSettingsTab.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ func AudioSettingsTab() *container.TabItem {
return audioSettingsTab
}

func DualVoiceSettings() *container.TabItem {
DualVoice := container.NewTabItem("Dual Speech Settings",
widget.NewSelect([]string{"AzureSpeech", "OpenAI"}, func(value string) {
log.Println("Select set to", value)
//UpdateSpeechProvider(value)
}))
return DualVoice
}

func UpdateSpeechProvider(value string) {
ChangeVoice(value)
}

func AudioSettings(soundIsOn int) {
ChangeSetting(soundIsOn)
}
Expand Down
1 change: 0 additions & 1 deletion dbChef.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ func createSettingsDatabase() error {
platform TEXT DEFAULT NULL,
audioOnly INTEGER DEFAULT 1,
theme TEXT DEFAULT 'auto',
voice TEXT DEFAULT 'AZURESPEECH',
language TEXT DEFAULT NULL,
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
accessToken TEXT DEFAULT NULL,
Expand Down
3 changes: 1 addition & 2 deletions mainApp.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ func mainApp(mapungubwe fyne.App) (*container.AppTabs, *container.Split) {
chatMediaTab := aigenUi.UserMedia()
//developerMode := aigenUi.Developer()
audioSettingsTab := aigenUi.AudioSettingsTab()
DualVoiceSettings := aigenUi.DualVoiceSettings()
//Create the tabs container and add the tabs to it
tabs := container.NewAppTabs(aiGen, //financeTab,
extendAI, chatMediaTab, settingsTab, audioSettingsTab, DualVoiceSettings)
extendAI, chatMediaTab, settingsTab, audioSettingsTab)

inputBoxContainer := SignInHandler(chat, tabs, aiGen)

Expand Down

0 comments on commit 1cbfa75

Please sign in to comment.