This project demonstrates a real-time voice assistant API that captures user actions and transforms them into blockchain interactions. As a demo use case, we use an on-chain reservation system for "The Blockchain Hotel," where reservations are modeled as NFTs. The voice assistant queries the user for check-in and check-out dates, checks if the corresponding NFTs are not minted, and if available, initiates a mint transaction.
- Real-time voice assistant API integration
- On-chain reservation system using NFTs
- Voice-based interaction for booking hotel rooms
- Checks availability of rooms by querying the blockchain
- Mints NFTs for reservations if available
const networks = [
{ networkId: 545, networkName: "Flow Testnet", address: "0x6d75b3F4FFE3C87495c7534e2166BFCe25ff9a95" },
{ networkId: 5003, networkName: 'Mantle Sepolia Testnet', address: "0x6d75b3F4FFE3C87495c7534e2166BFCe25ff9a95" },
{ networkId: 48899, networkName: "Zircuit Testnet", address: "0x6d75b3F4FFE3C87495c7534e2166BFCe25ff9a95" },
{ networkId: 84532, networkName: 'Base Sepolia', address: "0x6d75b3F4FFE3C87495c7534e2166BFCe25ff9a95" },
{ networkId: 534351, networkName: 'Scroll Sepolia', address: "0x6d75b3F4FFE3C87495c7534e2166BFCe25ff9a95" },
{ networkId: 11155111, networkName: "Sepolia", address: "0x3B831CfE1A113b4cb081c74ba146b1484f1D1917" },
];
-
Start the local blockchain:
yarn chain
-
Deploy the smart contracts to the desired network (replace
xxx
with the network name, e.g.,baseSepolia
):yarn deploy --network xxx
-
Start the front-end application:
yarn start
-
Start the real-time voice activity detection (VAD) service:
yarn relay
- The voice assistant will greet you and ask for your check-in and check-out dates.
- Provide the dates, and the assistant will check the availability by querying the blockchain.
- If the dates are available, the assistant will initiate a mint transaction to reserve the room as an NFT.
This project is licensed under the MIT License - see the LICENSE file for details.
Happy coding! 🚀