Transcripcion realtime y cambio a la tanscripcion large. Conexion al modelo large v3.
This commit is contained in:
		@ -22,9 +22,20 @@ import {Socket} from "phoenix"
 | 
			
		||||
import {LiveSocket} from "phoenix_live_view"
 | 
			
		||||
import topbar from "../vendor/topbar"
 | 
			
		||||
import SttRecorder from "./stt_recorder.js";
 | 
			
		||||
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content");
 | 
			
		||||
 | 
			
		||||
let Hooks = {};
 | 
			
		||||
 | 
			
		||||
Hooks.AudioPathHook = {
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.el.addEventListener("audio_path", (event) => {
 | 
			
		||||
      this.pushEvent("audio_path", { audio_path: event.detail.audio_path });
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
let liveSocket = new LiveSocket("/live", Socket, {
 | 
			
		||||
  hooks: { SttRecorder },
 | 
			
		||||
  hooks: { SttRecorder, Hooks},
 | 
			
		||||
  params: { _csrf_token: csrfToken }
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user