Compare commits

..

No commits in common. "c55c1d3563551517197760b24c48e657abd3c6d0" and "5d1d653ada799e57d995b80b1ee2776569d5cbec" have entirely different histories.

13 changed files with 0 additions and 1775 deletions

View file

@ -11,13 +11,6 @@ var format := AudioStreamWAV.FORMAT_16_BITS # This is the default format on rec
var noise_max_lvl := 2000000#10000000
func _ready() -> void:
%TTS_Voices.clear()
var i = 0
for vc in DisplayServer.tts_get_voices():
%TTS_Voices.add_item(vc["language"]+" "+vc["name"])
%TTS_Voices.set_item_metadata(i,vc)
i+=1
var idx := AudioServer.get_bus_index("Record")
effect = AudioServer.get_bus_effect(idx, 2)
%Controls.visible=false
@ -39,16 +32,6 @@ func save_words():
fl.close()
func _process(delta: float) -> void:
if tts_mode:
if %WordList.item_count<tts_spoken:
run_swap_code(1)
_on_tts_mode_pressed()
return
if !DisplayServer.tts_is_speaking():
await run_swap_code(1)
tts_spoken+=1
DisplayServer.tts_speak(last_item_text,%TTS_Voices.get_item_metadata(%TTS_Voices.selected)["id"])
return
auto_timer_t+=delta
if auto_timer and auto_timer_t>=auto_timer_val:
auto_timer_t=0
@ -65,8 +48,6 @@ var auto_timer := false
var auto_timer_val := 1.0
var auto_timer_t := 0.0
func _on_auto_switch_pressed() -> void:
if tts_mode:
return
auto_timer_val = %Time.value
auto_timer_t=0
auto_timer=!auto_timer
@ -75,19 +56,6 @@ func _on_auto_switch_pressed() -> void:
else:
%AutoSwitch.text="Start Timer"
var tts_mode := false
var tts_spoken := 0
func _on_tts_mode_pressed() -> void:
if auto_timer:
_on_auto_switch_pressed()
tts_mode=!tts_mode
tts_spoken=0
if tts_mode:
%TTSMode.text="Stop TTS"
_on_record_button_pressed()
else:
%TTSMode.text="Start TTS"
func run_swap_code(dir):
if effect.is_recording_active():

View file

@ -228,20 +228,6 @@ step = 0.25
value = 1.0
ticks_on_borders = true
[node name="HBoxContainer4" type="HBoxContainer" parent="TabContainer/Record/HBoxContainer3/Controls"]
layout_mode = 2
alignment = 1
[node name="TTSMode" type="Button" parent="TabContainer/Record/HBoxContainer3/Controls/HBoxContainer4"]
unique_name_in_owner = true
layout_mode = 2
text = "Start TTS"
[node name="TTS_Voices" type="OptionButton" parent="TabContainer/Record/HBoxContainer3/Controls/HBoxContainer4"]
unique_name_in_owner = true
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
[node name="HSeparator2" type="HSeparator" parent="TabContainer/Record/HBoxContainer3/Controls"]
self_modulate = Color(1, 1, 1, 0)
custom_minimum_size = Vector2(0, 40)
@ -330,7 +316,6 @@ placeholder_text = "Text to read load worlds"
[connection signal="pressed" from="TabContainer/Record/HBoxContainer3/Controls/HBoxContainer/SaveButton" to="." method="_on_save_button_pressed"]
[connection signal="pressed" from="TabContainer/Record/HBoxContainer3/Controls/HBoxContainer/OpenUserFolderButton" to="." method="_on_open_user_folder_button_pressed"]
[connection signal="pressed" from="TabContainer/Record/HBoxContainer3/Controls/HBoxContainer3/AutoSwitch" to="." method="_on_auto_switch_pressed"]
[connection signal="pressed" from="TabContainer/Record/HBoxContainer3/Controls/HBoxContainer4/TTSMode" to="." method="_on_tts_mode_pressed"]
[connection signal="pressed" from="TabContainer/Record/HBoxContainer3/Controls/HBoxContainer2/DeleteButton" to="." method="_on_delete_button_pressed"]
[connection signal="pressed" from="TabContainer/PlanText/HBoxContainer2/PlayTextBTN" to="." method="_on_play_text_btn_pressed"]
[connection signal="pressed" from="TabContainer/PlanText/HBoxContainer2/AddWordsBTN" to="." method="_on_add_words_btn_pressed"]

View file

@ -1,92 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://dw3yneckugr7i"]
[ext_resource type="Script" uid="uid://srkgrxnfaw0o" path="res://addons/ai_voices/GenerateDialog.cs" id="1_u4t6r"]
[sub_resource type="SystemFont" id="SystemFont_u4t6r"]
font_weight = 800
[sub_resource type="LabelSettings" id="LabelSettings_0yynb"]
font = SubResource("SystemFont_u4t6r")
font_size = 20
[node name="AIVoicesMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MainContainer" type="VBoxContainer" parent="."]
layout_mode = 0
offset_right = 424.0
offset_bottom = 185.0
[node name="LabelSettings" type="Label" parent="MainContainer"]
layout_mode = 2
text = "Settings:"
label_settings = SubResource("LabelSettings_0yynb")
[node name="VoiceContainer" type="HBoxContainer" parent="MainContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="MainContainer/VoiceContainer"]
layout_mode = 2
text = "Voice:"
[node name="voice" type="OptionButton" parent="MainContainer/VoiceContainer"]
layout_mode = 2
item_count = 1
popup/item_0/text = "Default"
popup/item_0/id = 0
[node name="LangContainer" type="HBoxContainer" parent="MainContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="MainContainer/LangContainer"]
layout_mode = 2
text = "Lang:"
[node name="lang" type="OptionButton" parent="MainContainer/LangContainer"]
layout_mode = 2
item_count = 5
popup/item_0/text = "en"
popup/item_0/id = 0
popup/item_1/text = "fr"
popup/item_1/id = 1
popup/item_2/text = "es"
popup/item_2/id = 2
popup/item_3/text = "it"
popup/item_3/id = 3
popup/item_4/text = "de"
popup/item_4/id = 4
[node name="Label" type="Label" parent="MainContainer"]
layout_mode = 2
text = "Text to generate:"
[node name="DialogToGenerate" type="TextEdit" parent="MainContainer"]
custom_minimum_size = Vector2(0, 80)
layout_mode = 2
placeholder_text = "Lorem ipsum"
scroll_smooth = true
scroll_fit_content_height = true
caret_type = 1
[node name="GenerateButton" type="Button" parent="MainContainer"]
layout_mode = 2
text = "Generate wav file"
script = ExtResource("1_u4t6r")
[node name="HSeparator" type="HSeparator" parent="MainContainer"]
layout_mode = 2
[node name="LinkButton" type="LinkButton" parent="MainContainer"]
layout_mode = 2
text = "AllTalk_TTS repos"
uri = "https://github.com/erew123/alltalk_tts"
[node name="LinkButton2" type="LinkButton" parent="MainContainer"]
layout_mode = 2
text = "How to install AllTalk?"
uri = "https://www.anthony-cardinale.fr/_public/unity-tools/AITools/AllTalk_Installation.pdf"

File diff suppressed because it is too large Load diff

View file

@ -1 +0,0 @@
uid://srkgrxnfaw0o

View file

@ -1,23 +0,0 @@
#if TOOLS
using Godot;
using System;
[Tool]
public partial class Voices : EditorPlugin
{
Control dock;
public override void _EnterTree()
{
dock = (Control)GD.Load<PackedScene>("addons/ai_voices/Dock_aivoices.tscn").Instantiate();
AddControlToDock(DockSlot.LeftUl, dock);
}
public override void _ExitTree()
{
RemoveControlFromDocks(dock);
dock.Free();
}
}
#endif

View file

@ -1 +0,0 @@
uid://dbb78cttweipf

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

View file

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://m8qmkaxyajs3"
path="res://.godot/imported/icon-aivoices.png-758b658cfba7c130942d59a689d24696.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/ai_voices/icon-aivoices.png"
dest_files=["res://.godot/imported/icon-aivoices.png-758b658cfba7c130942d59a689d24696.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,7 +0,0 @@
[plugin]
name="AI Voices"
description=""
author="Anthony Cardinale"
version="1.0"
script="Voices.cs"

View file

@ -21,7 +21,6 @@ config/icon="res://icon.webp"
[audio]
general/text_to_speech=true
driver/enable_input=true
enable_audio_input=true

View file

@ -1,4 +0,0 @@
extends Node
func _ready():
print("Hello world with no .UID files!")

View file

@ -1,21 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://b71653f53iyqe"]
[sub_resource type="GDScript" id="GDScript_unn25"]
script/source = "extends Node
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var scripts_dir = \"res://scripts/\"
for file in DirAccess.get_files_at(scripts_dir):
if file.ends_with(\".gd.txt\"):
var node = Node.new()
var script = GDScript.new()
script.source_code=FileAccess.get_file_as_string(scripts_dir+file)
script.reload()
node.set_script(script)
add_child(node)
"
[node name="Node" type="Node"]
script = SubResource("GDScript_unn25")