- API key for OpenAI.
- API key for Picovoice
- API key for ElevenLabs
- mpg123 installed
- node 18+
git clone https://gist.github.com/ericlewis/ccd3f0b7a17fcbe2473121a473082c8f
- edit .env with your keys
(?i)(shazam (this|that|the) song|identify (this|that|the) song|what('s| is)? (this|that|the) song|name (this|that|the) tune|(do|can|could|may|would) you (know|tell|identify|figure out) what( this| that| the)? song (is|playing)|which song is (this|that|the)|what track is (playing|this|that|the) (right now)?|listen to (this|that|the) and tell me what (it|this|that|the) is|find out the name of (this|that|the) song|(help me recognize|help me shazam) (this|that|the) song|what('s| is)? the name of (this|that|the) (jam|track)|id (this|that|the) song|what song am I hearing) |
package com.example.shazamwrapper; | |
import android.content.Context; | |
import com.shazam.shazamkit.AudioSampleRateInHz; | |
import com.shazam.shazamkit.Catalog; | |
import com.shazam.shazamkit.DeveloperToken; | |
import com.shazam.shazamkit.DeveloperTokenProvider; | |
import com.shazam.shazamkit.MatchResult; | |
import com.shazam.shazamkit.Session; |
package humaneinternal.system.voice; | |
import android.content.Context; | |
import androidx.annotation.NonNull; | |
import com.shazam.shazamkit.AudioSampleRateInHz; | |
import com.shazam.shazamkit.Catalog; | |
import com.shazam.shazamkit.DeveloperToken; | |
import com.shazam.shazamkit.DeveloperTokenProvider; |
export PATH="/opt/homebrew/bin:$PATH" | |
export CFLAGS="-I/opt/homebrew/opt/openssl/include" | |
export LDFLAGS="-L/opt/homebrew/opt/openssl/lib" | |
git clone https://github.com/bkerler/mtkclient | |
cd mtkclient | |
python3.9 -m venv mtk_venv | |
source mtk_venv/bin/activate |
import * as SecureStore from 'expo-secure-store'; | |
import AsyncStorage from '@react-native-async-storage/async-storage'; | |
class EphemeralSecureStore { | |
static prefix = "EphemeralSecureStore"; | |
static getEphemeralKey(key) { | |
return `${this.prefix}_${key}`; | |
} | |
import SwiftUI | |
let size: CGSize = { | |
return .init(width: 126.0, height: 36.9) | |
}() | |
let origin: CGPoint = { | |
return .init(x: UIScreen.main.bounds.midX - 0.3, y: 29.4) | |
}() |
import SwiftUI | |
import WebKit | |
// MARK: Observable Object | |
public class Chat: NSObject, ObservableObject { | |
internal var webView: WKWebView | |
private var decoder: JSONDecoder = { | |
let decoder = JSONDecoder() | |
decoder.keyDecodingStrategy = .convertFromSnakeCase |
import { Configuration, OpenAIApi } from "openai"; | |
import download from "download"; | |
import ora from "ora"; | |
import soundPlayer from "play-sound" | |
import prompts from "prompts"; | |
// Get your own keys, nerd. | |
const kOpenAI = "YOUR_API_KEY"; | |
const kUberDuck = "PRIVATE_KEY:PUBLIC_KEY"; |
extension Published: Encodable where Value: Encodable { | |
public func encode(to encoder: Encoder) throws { | |
var container = encoder.singleValueContainer() | |
let value = _PublishedValueExtractor.shared.extractValue(from: self) | |
try container.encode(value) | |
} | |
} | |
fileprivate struct _PublishedValueExtractor { | |
static let shared = _PublishedValueExtractor() |