Skip to content

Commit

Permalink
Release 1.5.1 (213)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis15yo committed Jan 9, 2024
1 parent f7a65d8 commit 1e582f2
Show file tree
Hide file tree
Showing 323 changed files with 9,954 additions and 3,492 deletions.
2 changes: 1 addition & 1 deletion Nicegram/NGData/Sources/NGSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public func isPremium() -> Bool {
if #available(iOS 13.0, *) {
return PremiumContainer.shared
.getPremiumStatusUseCase()
.hasPremiumOnDeviceNonIsolated()
.hasPremiumOnDevice()
} else {
return false
}
Expand Down
1 change: 0 additions & 1 deletion Nicegram/NGEnv/Sources/NGEnv.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public struct NGEnvObj: Decodable {
public let remote_config_cache_duration_seconds: Double
public let tapjoy_api_key: String
public let telegram_auth_bot: String
public let google_cloud_api_key: String
public let applovin_api_key: String
public let applovin_ad_unit_id: String
public let websocket_url: URL
Expand Down
1 change: 1 addition & 0 deletions Nicegram/NGTranslate/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ swift_library(
"Sources/**/*.swift",
]),
deps = [
"@swiftpkg_nicegram_assistant_ios//:Sources_FeatSpeechToText",
"@swiftpkg_nicegram_assistant_ios//:Sources_NGCore",
"//submodules/AccountContext:AccountContext",
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import FeatSpeechToText
import Foundation
import Postbox
import SwiftSignalKit
import TelegramCore

@available(iOS 13.0, *)
public class TgSpeechToTextManager {

// MARK: - Dependencies

private let convertSpeechToTextUseCase: ConvertSpeechToTextUseCase
private let mediaBox: MediaBox

// MARK: - Lifecycle

public init(mediaBox: MediaBox) {
self.convertSpeechToTextUseCase = SpeechToTextContainer.shared.convertSpeechToTextUseCase()
self.mediaBox = mediaBox
}
}

@available(iOS 13.0, *)
public extension TgSpeechToTextManager {
func convertSpeechToText(
mediaFile: TelegramMediaFile
) async -> ConvertSpeechToTextResult {
await withCheckedContinuation { continuation in
let _ = (mediaBox.resourceData(mediaFile.resource)
|> take(1)).start { data in
let url = URL(
fileURLWithPath: data.path
)

Task {
let result = await self.convertSpeechToTextUseCase(
url: url
)
continuation.resume(returning: result)
}
}
}
}
}
146 changes: 0 additions & 146 deletions Nicegram/NGTranslate/Sources/SpeechToText/TgVoiceToTextProcessor.swift

This file was deleted.

1 change: 1 addition & 0 deletions Nicegram/NGUI/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ swift_library(
"//Nicegram/NGStealthMode:NGStealthMode",
"@swiftpkg_nicegram_assistant_ios//:Sources_NGAiChatUI",
"@swiftpkg_nicegram_assistant_ios//:Sources_FeatImagesHubUI",
"@swiftpkg_nicegram_assistant_ios//:Sources_FeatSpeechToText",
],
visibility = [
"//visibility:public",
Expand Down
Loading

0 comments on commit 1e582f2

Please sign in to comment.