class TextEditingSeries:
@staticmethod
def add_new_lines(text: str, n1: int):
words = text.split(' ')
lines = []
current_line = []
current_length = 0
for word in words:
if current_length + len(word) + len(current_line) > n1:
lines.append(' '.join(current_line))
current_line = [word]
current_length = len(word)
else:
current_line.append(word)
current_length += len(word)
lines.append(' '.join(current_line))
return '\n'.join(lines)
import time
from LivinGrimoire23 import *
from AXPython import *
from MatrixGUI1 import App
from skills import *
from hidden_skills import *
import tkinter as tk
from tkinter import ttk
# from tkinter import messagebox
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
app = App()
app.brain.logicChobit.addSkill(DiTime())
app.brain.logicChobit.addSkill(DiHelloWorld())
app.brain.logicChobit.addSkill(DiBlabber("talking"))
app.brain.logicChobit.addSkill(DiEngager(1, "diblabber"))
app.brain.logicChobit.addSkill(DiMagic8Ball())
app.brain.logicChobit.addSkill(DiPunisher())
app.brain.logicChobit.addSkill(DiBored())
app.brain.logicChobit.addSkill(DiCron().setSound("moan"))
app.brain.logicChobit.addSkill(DiTreater())
app.brain.logicChobit.addSkill(DiHabit())
app.brain.logicChobit.addSkill(DiBurper(3))
app.brain.logicChobit.addSkill(DiSayer())
t:SkillBranch = SkillBranch(3)
t.addDefcon("lame")
t.addGoal("thanks")
t.addSkill(DiSmoothie0())
t.addSkill(DiSmoothie1())
app.brain.logicChobit.addSkill(t)
app.brain.logicChobit.addSkill(DiJumbler())
app.mainloop()
from playsound import playsound
import pyttsx3
class LGTTSv1:
def __init__(self):
self.engine = pyttsx3.init()
self.rate = self.engine.getProperty('rate')
self.engine.setProperty('rate', 125)
self.engine.setProperty('voice', 1)
self.volume = self.engine.getProperty('volume')
self.engine.setProperty('volume', 1.0)
self.voices = self.engine.getProperty('voices')
self.engine.setProperty('voice', self.voices[1].id)
def speak(self, txt: str):
self.engine.say(f'<pitch middle="10">{txt}</pitch>')
self.engine.runAndWait()
def stopEngine(self):
self.engine.stop()
@staticmethod
def playSoundFile(file: str):
playsound(file)
maybe it's in your dick hole?where the fuck did I put the old TTS alg
yeap found it!maybe it's in your dick hole?
import os
from pygame import mixer
class OGTTS:
def __init__(self):
mixer.init()
def playSoundFile(self, file: str)->bool:
if os.path.isfile(f'sounds/{file}.mp3'):
mixer.music.load(f'sounds/{file}.mp3')
mixer.music.play()
return True
words = file.split(' ')
for i in range(len(words)):
if not os.path.isfile(f'sounds/{words[i]}.mp3'):
return False
for i in range(len(words)):
mixer.music.load(f'sounds/{words[i]}.mp3')
mixer.music.play()
return True
import inflect
def number_to_words(number):
p = inflect.engine()
words = p.number_to_words(number)
return words
# Example usage:
print(number_to_words("12345"))
import inflect
def coefficient_to_words(coefficient):
p = inflect.engine()
if '.' in coefficient:
integer_part, decimal_part = coefficient.split('.')
words = p.number_to_words(integer_part) + ' point ' + ' '.join(p.number_to_words(i) for i in decimal_part)
else:
words = p.number_to_words(coefficient)
return words
# Example usage:
print(coefficient_to_words("123.45"))
import inflect
def time_to_words(time):
p = inflect.engine()
hour, minute = map(int, time.split(':'))
if hour <= 12:
hour_words = p.number_to_words(hour) + ' o\'clock'
else:
hour_words = p.number_to_words(hour - 12) + ' o\'clock'
if minute != 0:
minute_words = p.number_to_words(minute)
return hour_words + ' and ' + minute_words + ' minutes'
else:
return hour_words
# Example usage:
print(time_to_words("13:45"))