Skip to content

Commit ec82f00

Browse files
author
Atharva Vaidya
committed
chore: update package version
1 parent f3d8af7 commit ec82f00

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let package = Package(
88
products: [.library(name: "CompilerSwiftAI", targets: ["CompilerSwiftAI"])],
99
dependencies: [
1010
.package(url: "https://github.com/gonzalezreal/swift-markdown-ui", from: "2.4.1"),
11-
.package(url: "https://github.com/Compiler-Inc/Transcriber", branch: "main"),
11+
.package(url: "https://github.com/Compiler-Inc/Transcriber", branch: "0.1.8"),
1212
],
1313
targets: [
1414
.target(name: "CompilerSwiftAI", dependencies: ["Transcriber", .product(name: "MarkdownUI", package: "swift-markdown-ui")]),

Sources/CompilerSwiftAI/UI/Chat/ChatView/ChatViewModel.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,16 @@ class ChatViewModel: Transcribable {
102102
} else {
103103
recordingTask = Task {
104104
do {
105-
let stream = try await transcriber.startRecordingStream()
105+
let stream = try await transcriber.startStream()
106106
isRecording = true
107107

108108
for try await partialResult in stream {
109-
self._userInput = partialResult
109+
switch partialResult {
110+
case let .rms(float):
111+
print("rms: \(float)")
112+
case let .transcription(string):
113+
self._userInput = string
114+
}
110115
}
111116

112117
// Stream completed (silence detected), send the complete transcription

0 commit comments

Comments
 (0)