Search results

  1. fukurou

    👨‍💻 dev lambda skill experiment

    class CustomBot: def __init__(self, action_func): self.action = action_func # Set function dynamically def perform_action(self, *args): return self.action(*args) # Call the function with arguments # Define a custom function def greet(name): return f"Hello...
  2. fukurou

    👨‍💻 dev lambda skill experiment

    class Robot: def greet(self): return "Hello, I am a robot." # Define a new function def new_greet(): return "Hi! I'm your waifubot!" # Change the method dynamically robot_instance = Robot() robot_instance.greet = new_greet print(robot_instance.greet()) # Output: "Hi! I'm...
  3. fukurou

    👨‍💻 dev lambda skill experiment

    def process_text(text): text = text.strip() # Remove whitespace text = text.upper() # Convert to uppercase return f"Processed: {text}" result = apply_function(process_text, " hello world ") print(result) # Output: "Processed: HELLO WORLD"
  4. fukurou

    👨‍💻 dev F sharp port

    module LivinGrimorie // Define the AbsDictionaryDB class type AbsDictionaryDB() = member val Save: string -> string -> unit = fun _ _ -> printfn "Default Save method" with get, set member val Load: string -> string = fun _ -> "null" with get, set // Declare an object outside the class...
  5. fukurou

    👨‍💻 dev F sharp port

    module AbsDictionaryDB // Define the AbsDictionaryDB class type AbsDictionaryDB() = member val Save: string -> string -> unit = fun _ _ -> printfn "Default Save method" with get, set member val Load: string -> string = fun _ -> "null" with get, set // Declare an object outside the...
  6. fukurou

    cts ports

    CTS Methods Ported from Java to Swift 1/5 - AddContinuousSkill func addContinuousSkill(skill: Skill) { if isThinking { return } skill.setKokoro(kokoro) ctsSkills.append(skill) } 2/5 - ClearContinuousSkills func clearContinuousSkills() { if isThinking { return }...
  7. fukurou

    cts ports

    CTS Methods Ported from Java to JavaScript 1/5 - AddContinuousSkill function addContinuousSkill(skill) { if (this.isThinking) return; skill.setKokoro(this.kokoro); this.cts_skills.push(skill); } 2/5 - ClearContinuousSkills function clearContinuousSkills() { if (this.isThinking)...
  8. fukurou

    cts ports

    CTS Methods Ported from Java to C# 1/5 - AddContinuousSkill public void AddContinuousSkill(Skill skill) { if (this.IsThinking) return; skill.SetKokoro(this.Kokoro); this.CtsSkills.Add(skill); } 2/5 - ClearContinuousSkills public void ClearContinuousSkills() { if...
  9. fukurou

    cts ports

    CTS Methods Ported from Java to VB.NET 1/5 - AddContinuousSkill Public Sub AddContinuousSkill(skill As Skill) If Me.IsThinking Then Return skill.SetKokoro(Me.Kokoro) Me.CtsSkills.Add(skill) End Sub 2/5 - ClearContinuousSkills Public Sub ClearContinuousSkills() If Me.IsThinking...
  10. fukurou

    cts ports

    1/5 def add_continuous_skill(self, skill): if self.is_thinking: return skill.set_kokoro(self.kokoro) self.cts_skills.append(skill) 2/5 def clear_continuous_skills(self): if self.is_thinking: return self.cts_skills.clear() 3/5 def...
  11. fukurou

    cts ports

    public void addContinuousSkill(Skill skill) { if (this.isThinking) { return; } skill.setKokoro(this.kokoro); this.cts_skills.add(skill); } public void clearContinuousSkills() { if (this.isThinking) { return; } this.cts_skills.clear(); } public void...
  12. fukurou

    new STT code

    premode: import whisper import pyaudio import numpy as np import re import atexit from threading import Event from LivinGrimoire23 import Brain, Skill """ cmd winget install ffmpeg check if it installed ok: ffmpeg -version in python terminal: pip install openai-whisper pyaudio numpy wave """...
  13. fukurou

    new STT code

  14. fukurou

    new STT code

    class DiSTTSync(Skill): CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 16000 MIN_ACTIVE_SECONDS = 0.5 exit_event = Event() model = whisper.load_model("base") p = pyaudio.PyAudio() stream = p.open( format=FORMAT, channels=CHANNELS...
  15. fukurou

    new STT code

    the sync version seems more reliable: class DiSTTSync(Skill): CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 16000 MIN_ACTIVE_SECONDS = 0.5 exit_event = Event() model = whisper.load_model("base") p = pyaudio.PyAudio() stream = p.open(...
  16. fukurou

    new STT code

    1 piece version import whisper import pyaudio import numpy as np import re import atexit from threading import Event from LivinGrimoire23 import Brain from async_skills import ShorniSplash """ cmd winget install ffmpeg check if it installed ok: ffmpeg -version in python terminal: pip install...
  17. fukurou

    new STT code

    import whisper import pyaudio import numpy as np import re import atexit from threading import Event from LivinGrimoire23 import Brain from async_skills import ShorniSplash # befor runing the code: ''' cmd winget install ffmpeg check if it installed ok: ffmpeg -version in python terminal: pip...
  18. fukurou

    new STT code

    import whisper import pyaudio import numpy as np import re import atexit from threading import Event from LivinGrimoire23 import Brain from async_skills import ShorniSplash # befor runing the code: ''' cmd winget install ffmpeg check if it installed ok: ffmpeg -version in python terminal: pip...
  19. fukurou

    new STT code

    import whisper import pyaudio import numpy as np import re import atexit from threading import Event from LivinGrimoire23 import Brain from async_skills import ShorniSplash # Audio Settings CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 16000 MIN_ACTIVE_SECONDS = 0.5 # Minimum...
  20. fukurou

    new STT code

    import whisper import pyaudio import numpy as np import re import atexit from threading import Event from LivinGrimoire23 import Brain from async_skills import ShorniSplash # Audio Settings CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 16000 MIN_ACTIVE_SECONDS = 0.5 # Minimum...
Top